Examples of VBucket


Examples of com.couchbase.client.vbucket.config.VBucket

   */
  public List<Integer> getReplicaIndexes(String key) {
    TotalConfig totConfig = fullConfig.get();
    Config config = totConfig.getConfig();
    int vbucket = config.getVbucketByKey(key);
    VBucket bucket = config.getVbuckets().get(vbucket);
    List<Integer> indexes = new ArrayList<Integer>();
    for (int i = 0; i < VBucket.MAX_REPLICAS; i++) {
      if (bucket.getReplica(i) != VBucket.REPLICA_NOT_USED) {
        indexes.add(i);
      }
    }
    return indexes;
  }
View Full Code Here

Examples of com.couchbase.client.vbucket.config.VBucket

   */
  public boolean hasActiveMaster(String key) {
    TotalConfig totConfig = fullConfig.get();
    Config config = totConfig.getConfig();
    int vbucket = config.getVbucketByKey(key);
    VBucket bucket = config.getVbuckets().get(vbucket);
    return bucket.getMaster() != -1;
  }
View Full Code Here

Examples of com.couchbase.client.vbucket.config.VBucket

   */
  public List<Integer> getReplicaIndexes(String key) {
    TotalConfig totConfig = fullConfig.get();
    Config config = totConfig.getConfig();
    int vbucket = config.getVbucketByKey(key);
    VBucket bucket = config.getVbuckets().get(vbucket);
    List<Integer> indexes = new ArrayList<Integer>();
    for (int i = 0; i < VBucket.MAX_REPLICAS; i++) {
      if (bucket.getReplica(i) != VBucket.REPLICA_NOT_USED) {
        indexes.add(i);
      }
    }
    return indexes;
  }
View Full Code Here

Examples of com.couchbase.client.vbucket.config.VBucket

   */
  public boolean hasActiveMaster(String key) {
    TotalConfig totConfig = fullConfig.get();
    Config config = totConfig.getConfig();
    int vbucket = config.getVbucketByKey(key);
    VBucket bucket = config.getVbuckets().get(vbucket);
    return bucket.getMaster() != -1;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.