Package org.redisson.api.redisnode
Interface RedisClusterNode
- All Superinterfaces:
RedisClusterNodeAsync
,RedisNode
,RedisNodeAsync
- All Known Subinterfaces:
RedisClusterMaster
,RedisClusterSlave
- All Known Implementing Classes:
RedisNode
Base Redis Cluster node API interface
- Author:
- Nikita Koksharov
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.redisson.api.redisnode.RedisNode
RedisNode.InfoSection
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clusterAddSlots
(int... slots) Adds slots to this Redis nodelong
clusterCountFailureReports
(String nodeId) Returns number of failure reports for Redis node by defined idlong
clusterCountKeysInSlot
(int slot) Counts keys in defined slotvoid
clusterDeleteSlots
(int... slots) Removes slots from this Redis nodevoid
Removes all slots from this Redis nodevoid
clusterForget
(String nodeId) Removes Redis node by defined id from ClusterclusterGetKeysInSlot
(int slot, int count) Returns keys in defines slot limited by countReturns id of this Redis nodeReturns cluster information reported by this Redis nodevoid
clusterMeet
(String address) Joins Redis node by the defined address to Clustervoid
clusterReplicate
(String nodeId) Reconfigures this Redis node as replica of Redis node by defined id.void
clusterSetSlot
(int slot, SetSlotCommand command) Sets slot to this Redis node according to defined commandvoid
clusterSetSlot
(int slot, SetSlotCommand command, String nodeId) Sets slot to this Redis node according to defined commandReturn Redis Cluster slots mapped to Redis nodesMethods inherited from interface org.redisson.api.redisnode.RedisClusterNodeAsync
clusterAddSlotsAsync, clusterCountFailureReportsAsync, clusterCountKeysInSlotAsync, clusterDeleteSlotsAsync, clusterFlushSlotsAsync, clusterForgetAsync, clusterGetKeysInSlotAsync, clusterIdAsync, clusterInfoAsync, clusterMeetAsync, clusterReplicateAsync, clusterSetSlotAsync, clusterSetSlotAsync, clusterSlotsAsync
Methods inherited from interface org.redisson.api.redisnode.RedisNode
bgRewriteAOF, bgSave, getAddr, getConfig, getLastSaveTime, getMemoryStatistics, info, ping, ping, save, scheduleBgSave, setConfig, size, time
Methods inherited from interface org.redisson.api.redisnode.RedisNodeAsync
bgRewriteAOFAsync, bgSaveAsync, getConfigAsync, getLastSaveTimeAsync, getMemoryStatisticsAsync, infoAsync, pingAsync, pingAsync, saveAsync, scheduleBgSaveAsync, setConfigAsync, sizeAsync, timeAsync
-
Method Details
-
clusterInfo
Returns cluster information reported by this Redis node- Returns:
- cluster information
-
clusterId
String clusterId()Returns id of this Redis node- Returns:
- Redis node Id
-
clusterAddSlots
void clusterAddSlots(int... slots) Adds slots to this Redis node- Parameters:
slots
- slots to add
-
clusterReplicate
Reconfigures this Redis node as replica of Redis node by defined id.- Parameters:
nodeId
- Redis node Id
-
clusterForget
Removes Redis node by defined id from Cluster- Parameters:
nodeId
-
-
clusterDeleteSlots
void clusterDeleteSlots(int... slots) Removes slots from this Redis node- Parameters:
slots
- slots to remove
-
clusterCountKeysInSlot
long clusterCountKeysInSlot(int slot) Counts keys in defined slot- Parameters:
slot
- slot- Returns:
- keys amount
-
clusterGetKeysInSlot
Returns keys in defines slot limited by count- Parameters:
slot
- slotcount
- limits keys amount- Returns:
- keys
-
clusterSetSlot
Sets slot to this Redis node according to defined command- Parameters:
slot
- slotcommand
- slot command
-
clusterSetSlot
Sets slot to this Redis node according to defined command- Parameters:
slot
- slotcommand
- slot commandnodeId
- Redis node id
-
clusterMeet
Joins Redis node by the defined address to ClusterAddress example:
redis://127.0.0.1:9233
- Parameters:
address
- Redis node address
-
clusterCountFailureReports
Returns number of failure reports for Redis node by defined id- Parameters:
nodeId
- Redis node id- Returns:
- amount of failure reports
-
clusterFlushSlots
void clusterFlushSlots()Removes all slots from this Redis node -
clusterSlots
Map<ClusterSlotRange,Set<String>> clusterSlots()Return Redis Cluster slots mapped to Redis nodes- Returns:
- slots mapping
-