クラス LettuceSentinelConnection
java.lang.ObjectSE
org.springframework.data.redis.connection.lettuce.LettuceSentinelConnection
- 実装されているすべてのインターフェース:
CloseableSE、AutoCloseableSE、RedisSentinelCommands、RedisSentinelConnection
- 導入:
- 1.5
- 作成者:
- Christoph Strobl, Mark Paluch
コンストラクターの概要
コンストラクター修飾子コンストラクター説明LettuceSentinelConnection(io.lettuce.core.RedisClient redisClient) 付属のRedisClientを使用してLettuceSentinelConnectionを作成します。protectedLettuceSentinelConnection(io.lettuce.core.sentinel.api.StatefulRedisSentinelConnection<StringSE, StringSE> connection) 提供されている redis 接続を使用してLettuceSentinelConnectionを作成します。LettuceSentinelConnection(StringSE host, int port) LettuceSentinelConnection(StringSE host, int port, io.lettuce.core.resource.ClientResources clientResources) LettuceSentinelConnection(LettuceConnectionProvider connectionProvider) LettuceConnectionProviderを使用してLettuceSentinelConnectionを作成します。LettuceSentinelConnection(RedisNode sentinel) 提供されたRedisNode専用のクライアントを使用してLettuceSentinelConnectionを作成します。メソッドのサマリー
修飾子と型メソッド説明voidclose()voidマスターに到達できないかのようにフェイルオーバーを強制します。booleanisOpen()masters()監視対象のマスターとその状態のCollectionSE を取得します。voidmonitor(RedisServer server) 指定されたRedisNode.getName()、RedisNode.getHost()、RedisNode.getPort()、RedisServer.getQuorum()で新しいマスターの監視を開始するように sentinel に指示します。voidvoid指定されたマスターを削除します。指定されたマスターのレプリカのリストを表示します。
コンストラクターの詳細
LettuceSentinelConnection
提供されたRedisNode専用のクライアントを使用してLettuceSentinelConnectionを作成します。- パラメーター:
sentinel- 接続する sentinel。
LettuceSentinelConnection
- パラメーター:
host- null であってはなりません。port- sentinel ポート。
LettuceSentinelConnection
public LettuceSentinelConnection(StringSE host, int port, io.lettuce.core.resource.ClientResources clientResources) - パラメーター:
host- null であってはなりません。port- sentinel ポート。clientResources- null であってはなりません。
LettuceSentinelConnection
public LettuceSentinelConnection(io.lettuce.core.RedisClient redisClient) 付属のRedisClientを使用してLettuceSentinelConnectionを作成します。- パラメーター:
redisClient- null であってはなりません。
LettuceSentinelConnection
protected LettuceSentinelConnection(io.lettuce.core.sentinel.api.StatefulRedisSentinelConnection<StringSE, StringSE> connection) 提供されている redis 接続を使用してLettuceSentinelConnectionを作成します。- パラメーター:
connection- ネイティブ Lettuce 接続、null であってはなりません
LettuceSentinelConnection
LettuceConnectionProviderを使用してLettuceSentinelConnectionを作成します。- パラメーター:
connectionProvider- null であってはなりません。- 導入:
- 2.0
メソッドの詳細
failover
インターフェースからコピーされた説明:RedisSentinelCommandsマスターに到達できないかのようにフェイルオーバーを強制します。- 次で指定:
- インターフェース
RedisSentinelCommandsのfailover - パラメーター:
master- null であってはなりません。
masters
インターフェースからコピーされた説明:RedisSentinelCommands監視対象のマスターとその状態のCollectionSE を取得します。- 次で指定:
- インターフェース
RedisSentinelCommandsのmasters - 戻り値:
RedisServerのコレクション。null になることはありません。
replicas
インターフェースからコピーされた説明:RedisSentinelCommands指定されたマスターのレプリカのリストを表示します。- 次で指定:
- インターフェース
RedisSentinelCommandsのreplicas - パラメーター:
master- null であってはなりません。- 戻り値:
RedisServerのコレクション。null になることはありません。
slaves
- パラメーター:
masterName-- 戻り値:
- 関連事項:
remove
インターフェースからコピーされた説明:RedisSentinelCommands指定されたマスターを削除します。サーバーは監視されなくなり、RedisSentinelCommands.masters()によって返されることもなくなります。- 次で指定:
- インターフェース
RedisSentinelCommandsのremove - パラメーター:
master- null であってはなりません。
remove
- パラメーター:
masterName-- 関連事項:
monitor
インターフェースからコピーされた説明:RedisSentinelCommands指定されたRedisNode.getName()、RedisNode.getHost()、RedisNode.getPort()、RedisServer.getQuorum()で新しいマスターの監視を開始するように sentinel に指示します。- 次で指定:
- インターフェース
RedisSentinelCommandsのmonitor - パラメーター:
server- null であってはなりません。
close
- 次で指定:
- インターフェース
AutoCloseableSEのclose - 次で指定:
- インターフェース
CloseableSEのclose - 例外:
IOExceptionSE
isOpen
public boolean isOpen()- 次で指定:
- インターフェース
RedisSentinelConnectionのisOpen - 戻り値:
- サーバーに接続されている場合は true