public interface RedisClusterCommands
RedisClusterNode
can be obtained from
clusterGetNodes()
or it can be constructed using either host
and
RedisNode.getPort()
or the node Id
.Modifier and Type | Interface and Description |
---|---|
static class |
RedisClusterCommands.AddSlots |
Iterable<RedisClusterNode> clusterGetNodes()
Collection<RedisClusterNode> clusterGetSlaves(RedisClusterNode master)
master
- must not be null.Map<RedisClusterNode,Collection<RedisClusterNode>> clusterGetMasterSlaveMap()
Integer clusterGetSlotForKey(byte[] key)
key
.key
- must not be null.RedisClusterNode clusterGetNodeForSlot(int slot)
RedisClusterNode
serving given slot.slot
- RedisClusterNode clusterGetNodeForKey(byte[] key)
RedisClusterNode
serving given key.key
- must not be null.ClusterInfo clusterGetClusterInfo()
void clusterAddSlots(RedisClusterNode node, int... slots)
RedisClusterNode
.node
- must not be null.slots
- void clusterAddSlots(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterNode.SlotRange.getSlotsArray()
to given RedisClusterNode
.node
- must not be null.range
- must not be null.Long clusterCountKeysInSlot(int slot)
slot
- void clusterDeleteSlots(RedisClusterNode node, int... slots)
RedisClusterNode
.node
- must not be null.slots
- void clusterDeleteSlotsInRange(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterNode.SlotRange.getSlotsArray()
from given RedisClusterNode
.node
- must not be null.range
- must not be null.void clusterForget(RedisClusterNode node)
node
- must not be null.void clusterMeet(RedisClusterNode node)
node
- must contain host
and RedisNode.getPort()
and must
not be null.void clusterSetSlot(RedisClusterNode node, int slot, RedisClusterCommands.AddSlots mode)
node
- must not be null.slot
- mode
- must not benull.List<byte[]> clusterGetKeysInSlot(int slot, Integer count)
slot
- count
- must not be null.void clusterReplicate(RedisClusterNode master, RedisClusterNode replica)
master
- must not be null.replica
- must not be null.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.