Package org.redisson.api.redisnode
Interface RedisNode
- All Known Subinterfaces:
RedisClusterMaster
,RedisClusterNode
,RedisClusterSlave
,RedisMaster
,RedisSentinel
,RedisSlave
- All Known Implementing Classes:
RedisNode
,SentinelRedisNode
public interface RedisNode
Base Redis node API interface
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Runs an Append Only File rewrite process.void
bgSave()
Runs the Redis database saving process in background.getAddr()
Get Redis node addressGet value of Redis configuration parameter.Returns time of the last successful Redis database save operation.Returns Redis memory statisticsinfo
(RedisNode.InfoSection section) Returns information about Redis node.boolean
ping()
Ping Redis node.boolean
Ping Redis node with specified timeout.void
save()
Save the Redis database.void
Save the Redis database in background.void
Set value of Redis configuration parameter.long
size()
Returns keys amount stored in this Redis node.time()
Returns current Redis server time in seconds
-
Method Details
-
getMemoryStatistics
Returns Redis memory statistics- Returns:
- statistics info map
-
time
Time time()Returns current Redis server time in seconds- Returns:
- time in seconds
-
getAddr
InetSocketAddress getAddr()Get Redis node address- Returns:
- node address
-
ping
boolean ping()Ping Redis node. Default timeout is 1000 milliseconds- Returns:
true
if "PONG" reply received,false
otherwise
-
ping
Ping Redis node with specified timeout.- Parameters:
timeout
- - ping timeouttimeUnit
- - timeout unit- Returns:
true
if "PONG" reply received,false
otherwise
-
info
Returns information about Redis node.- Parameters:
section
- - section of information- Returns:
- information
-
getConfig
Get value of Redis configuration parameter.- Parameters:
parameter
- - name of parameter- Returns:
- value of parameter
-
setConfig
Set value of Redis configuration parameter.- Parameters:
parameter
- - name of parametervalue
- - value of parameter
-
bgSave
void bgSave()Runs the Redis database saving process in background. -
scheduleBgSave
void scheduleBgSave()Save the Redis database in background. If AOF rewrite process is in progress then the background save is scheduled to run upon its completion. -
save
void save()Save the Redis database. -
getLastSaveTime
Instant getLastSaveTime()Returns time of the last successful Redis database save operation.- Returns:
- time
-
bgRewriteAOF
void bgRewriteAOF()Runs an Append Only File rewrite process. Starts only if there is no a background process doing persistence.If fails no data gets lost
-
size
long size()Returns keys amount stored in this Redis node.- Returns:
- keys amount
-