Package com.couchbase.client.dcp.buffer
Class DcpBucketConfig
java.lang.Object
com.couchbase.client.dcp.buffer.DcpBucketConfig
A wrapper around a
ClusterTopologyWithBucket
that exposes just the bits the DCP client cares about.-
Constructor Summary
ConstructorsConstructorDescriptionDcpBucketConfig
(com.couchbase.client.core.topology.ClusterTopologyWithBucket topology) -
Method Summary
Modifier and TypeMethodDescriptionList
<com.couchbase.client.dcp.buffer.PartitionInstance> com.couchbase.client.core.util.HostAndPort
getActiveNodeKvAddress
(int partition) com.couchbase.client.core.util.HostAndPort
getAddress
(com.couchbase.client.core.topology.HostAndServicePorts node) List
<com.couchbase.client.dcp.buffer.PartitionInstance> getHostedPartitions
(com.couchbase.client.core.util.HostAndPort nodeAddress) List
<com.couchbase.client.core.topology.HostAndServicePorts> Returns an unmodifiable list containing only those nodes that are running the KV service.int
getNodeIndex
(com.couchbase.client.core.util.HostAndPort nodeAddress) boolean
hasCapability
(com.couchbase.client.core.topology.BucketCapability capability) List
<com.couchbase.client.core.topology.HostAndServicePorts> nodes()
int
int
com.couchbase.client.core.topology.TopologyRevision
rev()
-
Constructor Details
-
DcpBucketConfig
public DcpBucketConfig(com.couchbase.client.core.topology.ClusterTopologyWithBucket topology)
-
-
Method Details
-
rev
public com.couchbase.client.core.topology.TopologyRevision rev() -
numberOfPartitions
public int numberOfPartitions() -
nodes
-
getHostedPartitions
public List<com.couchbase.client.dcp.buffer.PartitionInstance> getHostedPartitions(com.couchbase.client.core.util.HostAndPort nodeAddress) throws NoSuchElementException - Throws:
NoSuchElementException
-
getKvNodes
Returns an unmodifiable list containing only those nodes that are running the KV service. -
getNodeIndex
public int getNodeIndex(com.couchbase.client.core.util.HostAndPort nodeAddress) throws NoSuchElementException - Throws:
NoSuchElementException
-
getActiveNodeKvAddress
public com.couchbase.client.core.util.HostAndPort getActiveNodeKvAddress(int partition) -
getAbsentPartitionInstances
-
getAddress
public com.couchbase.client.core.util.HostAndPort getAddress(com.couchbase.client.core.topology.HostAndServicePorts node) -
numberOfReplicas
public int numberOfReplicas() -
hasCapability
public boolean hasCapability(com.couchbase.client.core.topology.BucketCapability capability)
-