public interface ReactiveClusterCommands
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 |
ReactiveClusterCommands.AddSlots |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Void> |
clusterAddSlots(RedisClusterNode node,
int... slots)
Assign slots to given
RedisClusterNode . |
reactor.core.publisher.Mono<Void> |
clusterAddSlots(RedisClusterNode node,
RedisClusterNode.SlotRange range)
Assign
RedisClusterNode.SlotRange.getSlotsArray() to given RedisClusterNode . |
reactor.core.publisher.Mono<Long> |
clusterCountKeysInSlot(int slot)
Count the number of keys assigned to one slot.
|
reactor.core.publisher.Mono<Void> |
clusterDeleteSlots(RedisClusterNode node,
int... slots)
Remove slots from
RedisClusterNode . |
reactor.core.publisher.Mono<Void> |
clusterDeleteSlotsInRange(RedisClusterNode node,
RedisClusterNode.SlotRange range)
Removes
RedisClusterNode.SlotRange.getSlotsArray() from given RedisClusterNode . |
reactor.core.publisher.Mono<Void> |
clusterForget(RedisClusterNode node)
Remove given node from cluster.
|
reactor.core.publisher.Mono<ClusterInfo> |
clusterGetClusterInfo()
Get cluster information.
|
reactor.core.publisher.Flux<ByteBuffer> |
clusterGetKeysInSlot(int slot,
int count)
Get keys served by slot.
|
reactor.core.publisher.Mono<Map<RedisClusterNode,Collection<RedisClusterNode>>> |
clusterGetMasterSlaveMap()
Retrieve information about masters and their connected slaves.
|
reactor.core.publisher.Mono<RedisClusterNode> |
clusterGetNodeForKey(ByteBuffer key)
Find the
RedisClusterNode serving given key. |
reactor.core.publisher.Mono<RedisClusterNode> |
clusterGetNodeForSlot(int slot)
Find the
RedisClusterNode serving given slot. |
reactor.core.publisher.Flux<RedisClusterNode> |
clusterGetNodes()
Retrieve cluster node information such as id, host, port and slots.
|
reactor.core.publisher.Flux<RedisClusterNode> |
clusterGetSlaves(RedisClusterNode master)
Retrieve information about connected slaves for given master node.
|
reactor.core.publisher.Mono<Integer> |
clusterGetSlotForKey(ByteBuffer key)
Find the slot for a given
key . |
reactor.core.publisher.Mono<Void> |
clusterMeet(RedisClusterNode node)
Add given node to cluster.
|
reactor.core.publisher.Mono<Void> |
clusterReplicate(RedisClusterNode master,
RedisClusterNode replica)
Assign a slave to given master.
|
reactor.core.publisher.Mono<Void> |
clusterSetSlot(RedisClusterNode node,
int slot,
ReactiveClusterCommands.AddSlots mode) |
reactor.core.publisher.Flux<RedisClusterNode> clusterGetNodes()
Flux
emitting cluster nodes
, an empty one
if none
found.reactor.core.publisher.Flux<RedisClusterNode> clusterGetSlaves(RedisClusterNode master)
master
- must not be null.Flux
emitting cluster nodes
, an empty one
if none
found.reactor.core.publisher.Mono<Map<RedisClusterNode,Collection<RedisClusterNode>>> clusterGetMasterSlaveMap()
reactor.core.publisher.Mono<Integer> clusterGetSlotForKey(ByteBuffer key)
key
.key
- must not be null.Mono
emitting the calculated slog.reactor.core.publisher.Mono<RedisClusterNode> clusterGetNodeForSlot(int slot)
RedisClusterNode
serving given slot.slot
- Mono
emitting the RedisClusterNode
handling the given slot.reactor.core.publisher.Mono<RedisClusterNode> clusterGetNodeForKey(ByteBuffer key)
RedisClusterNode
serving given key.key
- must not be null.Mono
emitting the RedisClusterNode
handling the slot for the given key.reactor.core.publisher.Mono<ClusterInfo> clusterGetClusterInfo()
reactor.core.publisher.Mono<Void> clusterAddSlots(RedisClusterNode node, int... slots)
RedisClusterNode
.node
- must not be null.slots
- must not be empty.Mono
signaling completion.reactor.core.publisher.Mono<Void> clusterAddSlots(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterNode.SlotRange.getSlotsArray()
to given RedisClusterNode
.node
- must not be null.range
- must not be null.Mono
signaling completion.reactor.core.publisher.Mono<Long> clusterCountKeysInSlot(int slot)
slot
- Mono
emitting the number of keys stored at the given slot.reactor.core.publisher.Mono<Void> clusterDeleteSlots(RedisClusterNode node, int... slots)
RedisClusterNode
.node
- must not be null.Mono
signaling completion.reactor.core.publisher.Mono<Void> clusterDeleteSlotsInRange(RedisClusterNode node, RedisClusterNode.SlotRange range)
RedisClusterNode.SlotRange.getSlotsArray()
from given RedisClusterNode
.node
- must not be null.range
- must not be null.Mono
signaling completion.reactor.core.publisher.Mono<Void> clusterForget(RedisClusterNode node)
node
- must not be null.Mono
signaling completion.reactor.core.publisher.Mono<Void> clusterMeet(RedisClusterNode node)
node
- must contain host
and RedisNode.getPort()
and must
not be null.Mono
signaling completion.reactor.core.publisher.Mono<Void> clusterSetSlot(RedisClusterNode node, int slot, ReactiveClusterCommands.AddSlots mode)
node
- must not be null.slot
- mode
- must not benull.Mono
signaling completion.reactor.core.publisher.Flux<ByteBuffer> clusterGetKeysInSlot(int slot, int count)
slot
- count
- must not be null.Flux
emitting the number of requested keys in the given slot, or signalling completion if none
found.reactor.core.publisher.Mono<Void> clusterReplicate(RedisClusterNode master, RedisClusterNode replica)
master
- must not be null.replica
- must not be null.Mono
signaling completion.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.