Package org.redisson.redisnode
Class SentinelRedisNode
-
- org.redisson.redisnode.SentinelRedisNode
-
- All Implemented Interfaces:
RedisNode
,RedisNodeAsync
,RedisSentinel
,RedisSentinelAsync
public class SentinelRedisNode extends implements RedisSentinel, RedisSentinelAsync
- Author:
- Nikita Koksharov
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.redisson.api.redisnode.RedisNode
RedisNode.InfoSection
-
-
Constructor Summary
Constructors Constructor Description SentinelRedisNode(RedisClient client, CommandAsyncExecutor commandAsyncService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
obj)
void
masterName)
Starts failover process for defined Redis master>
masterName)
Starts failover process for defined Redis mastergetAddr()
Get Redis node addressRedisClient
getClient()
<,>
parameter)
Get value of Redis configuration parameter.<,>>
parameter)
Get value of Redis configuration parameter.<,>
masterName)
Returns map containing info regarding defined Redis master.masterName)
Returns network address of defined Redis master.>
masterName)
Returns network address of defined Redis master.<,>>
masterName)
Returns map containing info regarding defined Redis master.<<,>>
getMasters()
Returns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.<<,>>>
getMastersAsync()
Returns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.<,>
getMemoryStatistics()
Returns Redis memory statistics<,>>
getMemoryStatisticsAsync()
Returns Redis memory statistics<<,>>
masterName)
Returns list of map containing info regarding Redis Sentinel server monitoring defined master.<<,>>>
masterName)
Returns list of map containing info regarding Redis Sentinel server monitoring defined master.<<,>>
masterName)
Returns list of map containing info regarding Redis Slave server of defined master.<<,>>>
masterName)
Returns list of map containing info regarding Redis Slave server of defined master.int
hashCode()
<,>
info(RedisNode.InfoSection section)
Returns information about Redis node.<,>>
infoAsync(RedisNode.InfoSection section)
Returns information about Redis node.boolean
ping()
Ping Redis node.boolean
ping(long timeout, timeUnit)
Ping Redis node with specified timeout.>
pingAsync()
Ping Redis node.>
pingAsync(long timeout, timeUnit)
Ping Redis node with specified timeout.void
parameter, value)
Set value of Redis configuration parameter.>
parameter, value)
Set value of Redis configuration parameter.Time
time()
Returns current Redis server time in secondsRFuture<Time>
timeAsync()
Returns current Redis server time in secondstoString()
-
-
-
Constructor Detail
-
SentinelRedisNode
public SentinelRedisNode(RedisClient client, CommandAsyncExecutor commandAsyncService)
-
-
Method Detail
-
getClient
public RedisClient getClient()
-
getAddr
public getAddr()
Description copied from interface:RedisNode
Get Redis node address
-
getMemoryStatistics
public <,> getMemoryStatistics()
Description copied from interface:RedisNode
Returns Redis memory statistics- Specified by:
getMemoryStatistics
in interfaceRedisNode
- Returns:
- statistics info map
-
getMemoryStatisticsAsync
public <,>> getMemoryStatisticsAsync()
Description copied from interface:RedisNodeAsync
Returns Redis memory statistics- Specified by:
getMemoryStatisticsAsync
in interfaceRedisNodeAsync
- Returns:
- statistics info map
-
pingAsync
public > pingAsync()
Description copied from interface:RedisNodeAsync
Ping Redis node. Default timeout is 1000 milliseconds- Specified by:
pingAsync
in interfaceRedisNodeAsync
- Returns:
true
if "PONG" reply received,false
otherwise
-
pingAsync
public > pingAsync(long timeout, timeUnit)
Description copied from interface:RedisNodeAsync
Ping Redis node with specified timeout.- Specified by:
pingAsync
in interfaceRedisNodeAsync
- Parameters:
timeout
- - ping timeouttimeUnit
- - timeout unit- Returns:
true
if "PONG" reply received,false
otherwise
-
ping
public boolean ping()
Description copied from interface:RedisNode
Ping Redis node. Default timeout is 1000 milliseconds
-
ping
public boolean ping(long timeout, timeUnit)
Description copied from interface:RedisNode
Ping Redis node with specified timeout.
-
hashCode
public int hashCode()
- Overrides:
in class
-
equals
public boolean equals( obj)
- Overrides:
in class
-
timeAsync
public RFuture<Time> timeAsync()
Description copied from interface:RedisNodeAsync
Returns current Redis server time in seconds- Specified by:
timeAsync
in interfaceRedisNodeAsync
- Returns:
- time in seconds
-
time
public Time time()
Description copied from interface:RedisNode
Returns current Redis server time in seconds
-
toString
public toString()
- Overrides:
in class
-
info
public <,> info(RedisNode.InfoSection section)
Description copied from interface:RedisNode
Returns information about Redis node.
-
infoAsync
public <,>> infoAsync(RedisNode.InfoSection section)
Description copied from interface:RedisNodeAsync
Returns information about Redis node.- Specified by:
infoAsync
in interfaceRedisNodeAsync
- Parameters:
section
- - section of information- Returns:
- information map
-
getMasterAddr
public getMasterAddr( masterName)
Description copied from interface:RedisSentinel
Returns network address of defined Redis master.- Specified by:
getMasterAddr
in interfaceRedisSentinel
- Parameters:
masterName
- - name of master- Returns:
- network address
-
getSentinels
public <<,>> getSentinels( masterName)
Description copied from interface:RedisSentinel
Returns list of map containing info regarding Redis Sentinel server monitoring defined master.- Specified by:
getSentinels
in interfaceRedisSentinel
- Parameters:
masterName
- - name of master- Returns:
- list of Redis Sentinels
-
getMasters
public <<,>> getMasters()
Description copied from interface:RedisSentinel
Returns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.- Specified by:
getMasters
in interfaceRedisSentinel
- Returns:
- list of Redis Masters
-
getSlaves
public <<,>> getSlaves( masterName)
Description copied from interface:RedisSentinel
Returns list of map containing info regarding Redis Slave server of defined master.- Specified by:
getSlaves
in interfaceRedisSentinel
- Parameters:
masterName
- - name of master- Returns:
- list of Redis Slaves
-
getMaster
public <,> getMaster( masterName)
Description copied from interface:RedisSentinel
Returns map containing info regarding defined Redis master.- Specified by:
getMaster
in interfaceRedisSentinel
- Parameters:
masterName
- - name of master- Returns:
- map containing info
-
failover
public void failover( masterName)
Description copied from interface:RedisSentinel
Starts failover process for defined Redis master- Specified by:
failover
in interfaceRedisSentinel
- Parameters:
masterName
- - name of master
-
getMasterAddrAsync
public > getMasterAddrAsync( masterName)
Description copied from interface:RedisSentinelAsync
Returns network address of defined Redis master.- Specified by:
getMasterAddrAsync
in interfaceRedisSentinelAsync
- Parameters:
masterName
- - name of master- Returns:
- network address
-
getSentinelsAsync
public <<,>>> getSentinelsAsync( masterName)
Description copied from interface:RedisSentinelAsync
Returns list of map containing info regarding Redis Sentinel server monitoring defined master.- Specified by:
getSentinelsAsync
in interfaceRedisSentinelAsync
- Parameters:
masterName
- - name of master- Returns:
- list of Redis Sentinels
-
getMastersAsync
public <<,>>> getMastersAsync()
Description copied from interface:RedisSentinelAsync
Returns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.- Specified by:
getMastersAsync
in interfaceRedisSentinelAsync
- Returns:
- list of Redis Masters
-
getSlavesAsync
public <<,>>> getSlavesAsync( masterName)
Description copied from interface:RedisSentinelAsync
Returns list of map containing info regarding Redis Slave server of defined master.- Specified by:
getSlavesAsync
in interfaceRedisSentinelAsync
- Parameters:
masterName
- - name of master- Returns:
- list of Redis Slaves
-
getMasterAsync
public <,>> getMasterAsync( masterName)
Description copied from interface:RedisSentinelAsync
Returns map containing info regarding defined Redis master.- Specified by:
getMasterAsync
in interfaceRedisSentinelAsync
- Parameters:
masterName
- - name of master- Returns:
- map containing info
-
failoverAsync
public > failoverAsync( masterName)
Description copied from interface:RedisSentinelAsync
Starts failover process for defined Redis master- Specified by:
failoverAsync
in interfaceRedisSentinelAsync
- Parameters:
masterName
- - name of master
-
getConfig
public <,> getConfig( parameter)
Description copied from interface:RedisNode
Get value of Redis configuration parameter.
-
setConfig
public void setConfig( parameter, value)
Description copied from interface:RedisNode
Set value of Redis configuration parameter.
-
getConfigAsync
public <,>> getConfigAsync( parameter)
Description copied from interface:RedisNodeAsync
Get value of Redis configuration parameter.- Specified by:
getConfigAsync
in interfaceRedisNodeAsync
- Parameters:
parameter
- - name of parameter- Returns:
- value of parameter
-
setConfigAsync
public > setConfigAsync( parameter, value)
Description copied from interface:RedisNodeAsync
Set value of Redis configuration parameter.- Specified by:
setConfigAsync
in interfaceRedisNodeAsync
- Parameters:
parameter
- - name of parametervalue
- - value of parameter- Returns:
- void
-
-