N
- node typepublic class RedisNodes<N extends Node> extends Object implements NodesGroup<N>
Constructor and Description |
---|
RedisNodes(ConnectionManager connectionManager) |
Modifier and Type | Method and Description |
---|---|
int |
addConnectionListener(ConnectionListener connectionListener)
Adds connection listener which will be triggered
when Redisson has just been connected to or disconnected from redis server
|
N |
getNode(String address)
Get Redis node by address in format:
host:port |
Collection<N> |
getNodes()
All Redis nodes used by Redisson.
|
Collection<N> |
getNodes(NodeType type)
Get all Redis nodes by type
|
boolean |
pingAll()
Ping all Redis nodes
|
void |
removeConnectionListener(int listenerId)
Removes connection listener by id
|
public RedisNodes(ConnectionManager connectionManager)
public N getNode(String address)
NodesGroup
host:port
getNode
in interface NodesGroup<N extends Node>
address
- of nodepublic Collection<N> getNodes(NodeType type)
NodesGroup
getNodes
in interface NodesGroup<N extends Node>
type
- - type of nodepublic Collection<N> getNodes()
NodesGroup
getNodes
in interface NodesGroup<N extends Node>
public boolean pingAll()
NodesGroup
pingAll
in interface NodesGroup<N extends Node>
true
if all nodes have replied "PONG", false
in other case.public int addConnectionListener(ConnectionListener connectionListener)
NodesGroup
addConnectionListener
in interface NodesGroup<N extends Node>
connectionListener
- - connection listenerpublic void removeConnectionListener(int listenerId)
NodesGroup
removeConnectionListener
in interface NodesGroup<N extends Node>
listenerId
- - id of connection listenerCopyright © 2014–2017 The Redisson Project. All rights reserved.