Package org.redisson.redisnode
Class RedissonMasterSlaveNodes
- java.lang.Object
-
- org.redisson.redisnode.RedissonBaseNodes
-
- org.redisson.redisnode.RedissonMasterSlaveNodes
-
- All Implemented Interfaces:
BaseRedisNodes
,RedisMasterSlave
- Direct Known Subclasses:
RedissonSentinelMasterSlaveNodes
public class RedissonMasterSlaveNodes extends RedissonBaseNodes implements RedisMasterSlave
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description RedissonMasterSlaveNodes(ConnectionManager connectionManager, CommandAsyncExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RedisMaster
getMaster()
Returns Redis Master node belong to this Redis setup.RedisMaster
getMaster(String address)
Returns Redis Master node by defined address.RedisSlave
getSlave(String address)
Returns Redis Slave node by defined address.Collection<RedisSlave>
getSlaves()
Returns collection of Redis Slave nodes belongs to this Redis setup.-
Methods inherited from class org.redisson.redisnode.RedissonBaseNodes
getNode, getNodes, getNodes, pingAll, pingAll
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.redisson.api.redisnode.BaseRedisNodes
pingAll, pingAll
-
-
-
-
Constructor Detail
-
RedissonMasterSlaveNodes
public RedissonMasterSlaveNodes(ConnectionManager connectionManager, CommandAsyncExecutor commandExecutor)
-
-
Method Detail
-
getMaster
public RedisMaster getMaster()
Description copied from interface:RedisMasterSlave
Returns Redis Master node belong to this Redis setup.- Specified by:
getMaster
in interfaceRedisMasterSlave
- Returns:
- Redis Master nodes
-
getMaster
public RedisMaster getMaster(String address)
Description copied from interface:RedisMasterSlave
Returns Redis Master node by defined address.Address example:
redis://127.0.0.1:9233
- Specified by:
getMaster
in interfaceRedisMasterSlave
- Returns:
- Redis Master node
-
getSlaves
public Collection<RedisSlave> getSlaves()
Description copied from interface:RedisMasterSlave
Returns collection of Redis Slave nodes belongs to this Redis setup.- Specified by:
getSlaves
in interfaceRedisMasterSlave
- Returns:
- Redis Slave nodes
-
getSlave
public RedisSlave getSlave(String address)
Description copied from interface:RedisMasterSlave
Returns Redis Slave node by defined address.Address example:
redis://127.0.0.1:9233
- Specified by:
getSlave
in interfaceRedisMasterSlave
- Returns:
- Redis Slave node
-
-