Interface CouchbaseBucketConfig

All Superinterfaces:
BucketConfig
All Known Implementing Classes:
DefaultCouchbaseBucketConfig

public interface CouchbaseBucketConfig
extends BucketConfig
A configuration representing the couchbase bucket.
  • Method Details

    • nodeIndexForMaster

      short nodeIndexForMaster​(int partition, boolean useFastForward)
      Returns the node index for the given partition index and master.
      Parameters:
      partition - the index of the partition.
      useFastForward - if the fast forward config should be used.
      Returns:
      the index of the node.
    • nodeIndexForReplica

      short nodeIndexForReplica​(int partition, int replica, boolean useFastForward)
      Returns the node index for the given partition index and the replica.
      Parameters:
      partition - the index of the partition.
      replica - the replica number.
      useFastForward - if the fast forward config should be used.
      Returns:
      the index of the node.
    • numberOfPartitions

      int numberOfPartitions()
      Returns the total number of partitions.
      Returns:
      the number of partitions.
    • nodeAtIndex

      NodeInfo nodeAtIndex​(int nodeIndex)
      Returns information for the node at the given index.
      Parameters:
      nodeIndex - the index of the node.
      Returns:
      the information of the node at this index.
    • numberOfReplicas

      int numberOfReplicas()
      The number of configured replicas for this bucket.
      Returns:
      number of replicas.
    • hasPrimaryPartitionsOnNode

      boolean hasPrimaryPartitionsOnNode​(String hostname)
      Checks if the given hostname has active primary partitions assigned to it.
      Parameters:
      hostname - the hostname of the node to check against.
      Returns:
      true if it has, false otherwise.
    • ephemeral

      boolean ephemeral()
      If this couchbase bucket is ephemeral.
      Returns:
      true if it is, false otherwise.