クラス RedisSentinelConfiguration
java.lang.ObjectSE
org.springframework.data.redis.connection.RedisSentinelConfiguration
- 実装済みのインターフェース一覧:
RedisConfiguration, RedisConfiguration.SentinelConfiguration, RedisConfiguration.WithAuthentication, RedisConfiguration.WithDatabaseIndex, RedisConfiguration.WithPassword
public class RedisSentinelConfiguration
extends ObjectSE
implements RedisConfiguration, RedisConfiguration.SentinelConfiguration
Configuration クラスは、Redis Sentinel に接続するために RedisConnectionFactory を備えた RedisConnection をセットアップするために使用されます。高可用性 Redis 環境をセットアップする場合に役立ちます。- 導入:
- 1.4
- 作成者:
- Christoph Strobl, Thomas Darimont, Mark Paluch, Vikas Garg, John Blum, Samuel Klose, Mustapha Zorgati
ネストされたクラスの概要
インターフェース RedisConfiguration から継承されたネストクラス / インターフェース
RedisConfiguration.ClusterConfiguration, RedisConfiguration.DomainSocketConfiguration, RedisConfiguration.SentinelConfiguration, RedisConfiguration.StaticMasterReplicaConfiguration, RedisConfiguration.WithAuthentication, RedisConfiguration.WithDatabaseIndex, RedisConfiguration.WithDomainSocket, RedisConfiguration.WithHostAndPort, RedisConfiguration.WithPasswordコンストラクター概要
コンストラクターコンストラクター説明新しいデフォルトのRedisSentinelConfigurationを作成します。RedisSentinelConfiguration(StringSE master, SetSE<StringSE> sentinelHostAndPorts) 指定されたhostPortSE の組み合わせに対して新しいRedisSentinelConfigurationを作成します。方法の概要
修飾子と型メソッド説明voidaddSentinel(RedisNode sentinel) sentinel を追加します。booleanint使用するデータベースインデックスを取得します。@Nullable NamedNodeSentinel マスターノードを取得します。接続時に使用する RedisPassword を取得します。Redis Sentinel に接続するときに使用するRedisPasswordを返します。センチネルのCollections.unmodifiableSet(Set)SE を返します。@Nullable StringSE接続時に使用するユーザー名を取得します。@Nullable StringSE接続時に使用するユーザー名を取得します。inthashCode()static RedisSentinelConfigurationof(PropertySource<?> propertySource) 指定されたPropertySourceから新しいRedisSentinelConfigurationを構築します。voidsetDatabase(int index) 使用するデータベースインデックスを設定します。voidマスターノードを設定します。voidsetPassword(RedisPassword password) 指定されたStringSE に対してRedisPasswordを作成および設定します。voidsetSentinelPassword(RedisPassword sentinelPassword) Redis Sentinel で認証するときに使用するRedisPasswordを設定します。voidsetSentinels(IterableSE<RedisNode> sentinels) 接続するセンチネルを設定します。voidsetSentinelUsername(@Nullable StringSE sentinelUsername) 指定されたStringSE を使用してユーザー名を作成および設定します。voidsetUsername(@Nullable StringSE username) 指定されたStringSE を使用してユーザー名を作成および設定します。クラス ObjectSE から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース RedisConfiguration から継承されたメソッド
getDatabaseOrElse, getPasswordOrElseインターフェース RedisConfiguration.SentinelConfiguration から継承されたメソッド
getDataNodePassword, getDataNodeUsername, setMaster, setSentinelPassword, setSentinelPasswordインターフェース RedisConfiguration.WithAuthentication から継承されたメソッド
setPassword, setPassword
コンストラクターの詳細
RedisSentinelConfiguration
public RedisSentinelConfiguration()新しいデフォルトのRedisSentinelConfigurationを作成します。RedisSentinelConfiguration
指定されたhostPortSE の組み合わせに対して新しいRedisSentinelConfigurationを作成します。sentinelHostAndPorts[0] = 127.0.0.1:23679 sentinelHostAndPorts[1] = 127.0.0.1:23680 ...
- パラメーター:
sentinelHostAndPorts- null であってはなりません。- 導入:
- 1.5
メソッドの詳細
of
指定されたPropertySourceから新しいRedisSentinelConfigurationを構築します。- パラメーター:
propertySource- null であってはなりません。- 戻り値:
- 指定された
PropertySourceから構成された新しいRedisSentinelConfiguration。 - 導入:
- 3.3
setSentinels
接続するセンチネルを設定します。- パラメーター:
sentinels- null であってはなりません。
getSentinels
インターフェースからコピーされた説明:RedisConfiguration.SentinelConfigurationセンチネルのCollections.unmodifiableSet(Set)SE を返します。- 次で指定:
- インターフェース
RedisConfiguration.SentinelConfigurationのgetSentinels - 戻り値:
- センチネルの
SetSE。null になることはありません。
addSentinel
setMaster
インターフェースからコピーされた説明:RedisConfiguration.SentinelConfigurationマスターノードを設定します。- 次で指定:
- インターフェース
RedisConfiguration.SentinelConfigurationのsetMaster - パラメーター:
master- null であってはなりません。
getMaster
インターフェースからコピーされた説明:RedisConfiguration.SentinelConfigurationSentinel マスターノードを取得します。- 次で指定:
- インターフェース
RedisConfiguration.SentinelConfigurationのgetMaster - 戻り値:
- マスターノードを取得するか、設定されていない場合は null を取得します。
master
- パラメーター:
master- マスターノード名。- 戻り値:
- this。
- 関連事項:
master
- パラメーター:
master- マスターノード- 戻り値:
- this。
- 関連事項:
sentinel
- パラメーター:
sentinel- sentinel として追加するノード。- 戻り値:
- this。
- 関連事項:
sentinel
- パラメーター:
host- redis sentinel ノードのホスト名または IP。port- redis sentinel ポート。- 戻り値:
- this。
- 関連事項:
getDatabase
public int getDatabase()インターフェースからコピーされた説明:RedisConfiguration.WithDatabaseIndex使用するデータベースインデックスを取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithDatabaseIndexのgetDatabase - 戻り値:
- デフォルトでは
zero。
setDatabase
public void setDatabase(int index) インターフェースからコピーされた説明:RedisConfiguration.WithDatabaseIndex使用するデータベースインデックスを設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithDatabaseIndexのsetDatabase - パラメーター:
index-
setUsername
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication指定されたStringSE を使用してユーザー名を作成および設定します。Redis 6 以降が必要です。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのsetUsername - パラメーター:
username- ユーザー名。
getUsername
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication接続時に使用するユーザー名を取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのgetUsername - 戻り値:
- 何も設定されていない場合は null。
getPassword
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication接続時に使用する RedisPassword を取得します。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのgetPassword - 戻り値:
- 何も設定されていない場合は
RedisPassword.none()。
setPassword
インターフェースからコピーされた説明:RedisConfiguration.WithAuthentication指定されたStringSE に対してRedisPasswordを作成および設定します。- 次で指定:
- インターフェース
RedisConfiguration.WithAuthenticationのsetPassword - パラメーター:
password- null であってはならず、代わりにRedisPassword.none()を使用してください。
getSentinelUsername
インターフェースからコピーされた説明:RedisConfiguration.SentinelConfiguration接続時に使用するユーザー名を取得します。- 次で指定:
- インターフェース
RedisConfiguration.SentinelConfigurationのgetSentinelUsername - 戻り値:
- 何も設定されていない場合は null。
setSentinelUsername
インターフェースからコピーされた説明:RedisConfiguration.SentinelConfiguration指定されたStringSE を使用してユーザー名を作成および設定します。Redis 6 以降が必要です。- 次で指定:
- インターフェース
RedisConfiguration.SentinelConfigurationのsetSentinelUsername - パラメーター:
sentinelUsername- sentinel のユーザー名。
setSentinelPassword
インターフェースからコピーされた説明:RedisConfiguration.SentinelConfigurationRedis Sentinel で認証するときに使用するRedisPasswordを設定します。- 次で指定:
- インターフェース
RedisConfiguration.SentinelConfigurationのsetSentinelPassword - パラメーター:
sentinelPassword- null であってはならず、代わりにRedisPassword.none()を使用してください。
getSentinelPassword
インターフェースからコピーされた説明:RedisConfiguration.SentinelConfigurationRedis Sentinel に接続するときに使用するRedisPasswordを返します。
パスワードが設定されていない場合は、RedisConfiguration.SentinelConfiguration.setSentinelPassword(RedisPassword)またはRedisPassword.none()を介して設定できます。- 次で指定:
- インターフェース
RedisConfiguration.SentinelConfigurationのgetSentinelPassword - 戻り値:
- Redis Sentinel で認証するための
RedisPassword。
equals
hashCode