Package org.redisson.redisnode
Class SentinelRedisNode
java.lang.Object
org.redisson.redisnode.SentinelRedisNode
- All Implemented Interfaces:
RedisNode,RedisNodeAsync,RedisSentinel,RedisSentinelAsync
- Author:
- Nikita Koksharov
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.redisson.api.redisnode.RedisNode
RedisNode.InfoSection -
Constructor Summary
ConstructorsConstructorDescriptionSentinelRedisNode(RedisClient client, CommandAsyncExecutor commandAsyncService) -
Method Summary
Modifier and TypeMethodDescriptionvoidRuns an Append Only File rewrite process.Runs an Append Only File rewrite process.voidbgSave()Runs the Redis database saving process in background.Runs the Redis database saving process in background.booleanvoidStarts failover process for defined Redis masterfailoverAsync(String masterName) Starts failover process for defined Redis mastergetAddr()Get Redis node addressGet value of Redis configuration parameter.getConfigAsync(String parameter) Get value of Redis configuration parameter.Returns time of the last successful Redis database save operation.Returns time of the last successful Redis database save operation.Returns map containing info regarding defined Redis master.getMasterAddr(String masterName) Returns network address of defined Redis master.getMasterAddrAsync(String masterName) Returns network address of defined Redis master.getMasterAsync(String masterName) Returns map containing info regarding defined Redis master.Returns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.Returns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.Returns Redis memory statisticsReturns Redis memory statisticsgetSentinels(String masterName) Returns list of map containing info regarding Redis Sentinel server monitoring defined master.getSentinelsAsync(String masterName) Returns list of map containing info regarding Redis Sentinel server monitoring defined master.Returns list of map containing info regarding Redis Slave server of defined master.getSlavesAsync(String masterName) Returns list of map containing info regarding Redis Slave server of defined master.inthashCode()info(RedisNode.InfoSection section) Returns information about Redis node.infoAsync(RedisNode.InfoSection section) Returns information about Redis node.booleanping()Ping Redis node.booleanPing Redis node with specified timeout.Ping Redis node.Ping Redis node with specified timeout.voidsave()Save the Redis database.Save the Redis database.voidSave the Redis database in background.Save the Redis database in background.voidSet value of Redis configuration parameter.setConfigAsync(String parameter, String value) Set value of Redis configuration parameter.longsize()Returns keys amount stored in this Redis node.Returns keys amount stored in this Redis node.time()Returns current Redis server time in secondsReturns current Redis server time in secondstoString()
-
Constructor Details
-
SentinelRedisNode
-
-
Method Details
-
getClient
-
getAddr
Description copied from interface:RedisNodeGet Redis node address -
getMemoryStatistics
Description copied from interface:RedisNodeReturns Redis memory statistics- Specified by:
getMemoryStatisticsin interfaceRedisNode- Returns:
- statistics info map
-
getMemoryStatisticsAsync
Description copied from interface:RedisNodeAsyncReturns Redis memory statistics- Specified by:
getMemoryStatisticsAsyncin interfaceRedisNodeAsync- Returns:
- statistics info map
-
pingAsync
Description copied from interface:RedisNodeAsyncPing Redis node. Default timeout is 1000 milliseconds- Specified by:
pingAsyncin interfaceRedisNodeAsync- Returns:
trueif "PONG" reply received,falseotherwise
-
pingAsync
Description copied from interface:RedisNodeAsyncPing Redis node with specified timeout.- Specified by:
pingAsyncin interfaceRedisNodeAsync- Parameters:
timeout- - ping timeouttimeUnit- - timeout unit- Returns:
trueif "PONG" reply received,falseotherwise
-
ping
public boolean ping()Description copied from interface:RedisNodePing Redis node. Default timeout is 1000 milliseconds -
ping
Description copied from interface:RedisNodePing Redis node with specified timeout. -
hashCode
public int hashCode() -
equals
-
timeAsync
Description copied from interface:RedisNodeAsyncReturns current Redis server time in seconds- Specified by:
timeAsyncin interfaceRedisNodeAsync- Returns:
- time in seconds
-
time
Description copied from interface:RedisNodeReturns current Redis server time in seconds -
toString
-
info
Description copied from interface:RedisNodeReturns information about Redis node. -
infoAsync
Description copied from interface:RedisNodeAsyncReturns information about Redis node.- Specified by:
infoAsyncin interfaceRedisNodeAsync- Parameters:
section- - section of information- Returns:
- information map
-
getMasterAddr
Description copied from interface:RedisSentinelReturns network address of defined Redis master.- Specified by:
getMasterAddrin interfaceRedisSentinel- Parameters:
masterName- - name of master- Returns:
- network address
-
getSentinels
Description copied from interface:RedisSentinelReturns list of map containing info regarding Redis Sentinel server monitoring defined master.- Specified by:
getSentinelsin interfaceRedisSentinel- Parameters:
masterName- - name of master- Returns:
- list of Redis Sentinels
-
getMasters
Description copied from interface:RedisSentinelReturns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.- Specified by:
getMastersin interfaceRedisSentinel- Returns:
- list of Redis Masters
-
getSlaves
Description copied from interface:RedisSentinelReturns list of map containing info regarding Redis Slave server of defined master.- Specified by:
getSlavesin interfaceRedisSentinel- Parameters:
masterName- - name of master- Returns:
- list of Redis Slaves
-
getMaster
Description copied from interface:RedisSentinelReturns map containing info regarding defined Redis master.- Specified by:
getMasterin interfaceRedisSentinel- Parameters:
masterName- - name of master- Returns:
- map containing info
-
failover
Description copied from interface:RedisSentinelStarts failover process for defined Redis master- Specified by:
failoverin interfaceRedisSentinel- Parameters:
masterName- - name of master
-
getMasterAddrAsync
Description copied from interface:RedisSentinelAsyncReturns network address of defined Redis master.- Specified by:
getMasterAddrAsyncin interfaceRedisSentinelAsync- Parameters:
masterName- - name of master- Returns:
- network address
-
getSentinelsAsync
Description copied from interface:RedisSentinelAsyncReturns list of map containing info regarding Redis Sentinel server monitoring defined master.- Specified by:
getSentinelsAsyncin interfaceRedisSentinelAsync- Parameters:
masterName- - name of master- Returns:
- list of Redis Sentinels
-
getMastersAsync
Description copied from interface:RedisSentinelAsyncReturns list of map containing info regarding Redis Master server monitored by current Redis Sentinel server.- Specified by:
getMastersAsyncin interfaceRedisSentinelAsync- Returns:
- list of Redis Masters
-
getSlavesAsync
Description copied from interface:RedisSentinelAsyncReturns list of map containing info regarding Redis Slave server of defined master.- Specified by:
getSlavesAsyncin interfaceRedisSentinelAsync- Parameters:
masterName- - name of master- Returns:
- list of Redis Slaves
-
getMasterAsync
Description copied from interface:RedisSentinelAsyncReturns map containing info regarding defined Redis master.- Specified by:
getMasterAsyncin interfaceRedisSentinelAsync- Parameters:
masterName- - name of master- Returns:
- map containing info
-
failoverAsync
Description copied from interface:RedisSentinelAsyncStarts failover process for defined Redis master- Specified by:
failoverAsyncin interfaceRedisSentinelAsync- Parameters:
masterName- - name of master
-
getConfig
Description copied from interface:RedisNodeGet value of Redis configuration parameter. -
setConfig
Description copied from interface:RedisNodeSet value of Redis configuration parameter. -
getConfigAsync
Description copied from interface:RedisNodeAsyncGet value of Redis configuration parameter.- Specified by:
getConfigAsyncin interfaceRedisNodeAsync- Parameters:
parameter- - name of parameter- Returns:
- value of parameter
-
setConfigAsync
Description copied from interface:RedisNodeAsyncSet value of Redis configuration parameter.- Specified by:
setConfigAsyncin interfaceRedisNodeAsync- Parameters:
parameter- - name of parametervalue- - value of parameter- Returns:
- void
-
bgSave
public void bgSave()Description copied from interface:RedisNodeRuns the Redis database saving process in background. -
scheduleBgSave
public void scheduleBgSave()Description copied from interface:RedisNodeSave the Redis database in background. If AOF rewrite process is in progress then the background save is scheduled to run upon its completion.- Specified by:
scheduleBgSavein interfaceRedisNode
-
save
public void save()Description copied from interface:RedisNodeSave the Redis database. -
getLastSaveTime
Description copied from interface:RedisNodeReturns time of the last successful Redis database save operation.- Specified by:
getLastSaveTimein interfaceRedisNode- Returns:
- time
-
bgSaveAsync
Description copied from interface:RedisNodeAsyncRuns the Redis database saving process in background.- Specified by:
bgSaveAsyncin interfaceRedisNodeAsync
-
scheduleBgSaveAsync
Description copied from interface:RedisNodeAsyncSave the Redis database in background. If AOF rewrite process is in progress then the background save is scheduled to run upon its completion.- Specified by:
scheduleBgSaveAsyncin interfaceRedisNodeAsync
-
saveAsync
Description copied from interface:RedisNodeAsyncSave the Redis database.- Specified by:
saveAsyncin interfaceRedisNodeAsync
-
getLastSaveTimeAsync
Description copied from interface:RedisNodeAsyncReturns time of the last successful Redis database save operation.- Specified by:
getLastSaveTimeAsyncin interfaceRedisNodeAsync- Returns:
- time
-
bgRewriteAOF
public void bgRewriteAOF()Description copied from interface:RedisNodeRuns an Append Only File rewrite process. Starts only if there is no a background process doing persistence.If fails no data gets lost
- Specified by:
bgRewriteAOFin interfaceRedisNode
-
bgRewriteAOFAsync
Description copied from interface:RedisNodeAsyncRuns an Append Only File rewrite process. Starts only if there is no a background process doing persistence.If fails no data gets lost
- Specified by:
bgRewriteAOFAsyncin interfaceRedisNodeAsync
-
size
public long size()Description copied from interface:RedisNodeReturns keys amount stored in this Redis node. -
sizeAsync
Description copied from interface:RedisNodeAsyncReturns keys amount stored in this Redis node.- Specified by:
sizeAsyncin interfaceRedisNodeAsync- Returns:
- keys amount
-