クラス 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
を作成します。protected
LettuceSentinelConnection
(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
を作成します。メソッドのサマリー
修飾子と型メソッド説明void
close()
void
マスターに到達できないかのようにフェイルオーバーを強制します。boolean
isOpen()
masters()
監視対象のマスターとその状態のCollection
SE を取得します。void
monitor
(RedisServer server) 指定されたRedisNode.getName()
、RedisNode.getHost()
、RedisNode.getPort()
、RedisServer.getQuorum()
で新しいマスターの監視を開始するように sentinel に指示します。void
void
指定されたマスターを削除します。指定されたマスターのレプリカのリストを表示します。
コンストラクターの詳細
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
監視対象のマスターとその状態のCollection
SE を取得します。- 次で指定:
- インターフェース
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