Class PartitionMap
java.lang.Object
com.couchbase.client.core.topology.PartitionMap
A map from partition index to info about the partition.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactive
(int partition) Returns info about the node hosting the active instance of the given partition (vBucket), or empty if the active is not currently available or there is no such partition.availableReplicas
(int partition) Returns info about the nodes hosting replica instances of the given partition (vBucket), or empty if no replicas are currently available or there is no such partition.void
forEach
(BiConsumer<Integer, PartitionTopology> action) Passes each map entry to the given consumer.get
(int partition) int
size()
Returns the number of partitions.toString()
values()
-
Constructor Details
-
PartitionMap
-
-
Method Details
-
get
-
values
-
size
public int size()Returns the number of partitions. -
forEach
Passes each map entry to the given consumer.- Parameters:
action
- First argument is partition index, second argument is info about the associated partition.
-
active
Returns info about the node hosting the active instance of the given partition (vBucket), or empty if the active is not currently available or there is no such partition. -
availableReplicas
Returns info about the nodes hosting replica instances of the given partition (vBucket), or empty if no replicas are currently available or there is no such partition. -
toString
-