com.couchbase.client.vbucket.config
Class CacheConfig

java.lang.Object
  extended by com.couchbase.client.vbucket.config.CacheConfig
All Implemented Interfaces:
Config

public class CacheConfig
extends java.lang.Object
implements Config

The CacheConfig class represents a configuration object for memcached-type buckets. Unlike couchbase-type buckets, they don't support vbuckets and replicas, so some of the interface methods are not supported.


Constructor Summary
CacheConfig(int serversCount)
           
 
Method Summary
 ConfigDifference compareTo(Config config)
           
 int foundIncorrectMaster(int vbucket, int wrongServer)
           
 ConfigType getConfigType()
           
 java.util.List<java.net.URL> getCouchServers()
           
 net.spy.memcached.HashAlgorithm getHashAlgorithm()
           
 int getMaster(int vbucketIndex)
           
 int getReplica(int vbucketIndex, int replicaIndex)
           
 int getReplicasCount()
           
 java.lang.String getServer(int serverIndex)
           
 java.util.List<java.lang.String> getServers()
           
 int getServersCount()
           
 int getVbucketByKey(java.lang.String key)
           
 java.util.List<VBucket> getVbuckets()
           
 int getVbucketsCount()
           
 void setServers(java.util.List<java.lang.String> newServers)
           
 void setVbuckets(java.util.List<VBucket> newVbuckets)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheConfig

public CacheConfig(int serversCount)
Method Detail

getReplicasCount

public int getReplicasCount()
Specified by:
getReplicasCount in interface Config

getVbucketsCount

public int getVbucketsCount()
Specified by:
getVbucketsCount in interface Config

getServersCount

public int getServersCount()
Specified by:
getServersCount in interface Config

getServer

public java.lang.String getServer(int serverIndex)
Specified by:
getServer in interface Config

getVbucketByKey

public int getVbucketByKey(java.lang.String key)
Specified by:
getVbucketByKey in interface Config

getMaster

public int getMaster(int vbucketIndex)
Specified by:
getMaster in interface Config

getReplica

public int getReplica(int vbucketIndex,
                      int replicaIndex)
Specified by:
getReplica in interface Config

foundIncorrectMaster

public int foundIncorrectMaster(int vbucket,
                                int wrongServer)
Specified by:
foundIncorrectMaster in interface Config

setServers

public void setServers(java.util.List<java.lang.String> newServers)

setVbuckets

public void setVbuckets(java.util.List<VBucket> newVbuckets)

getServers

public java.util.List<java.lang.String> getServers()
Specified by:
getServers in interface Config

getVbuckets

public java.util.List<VBucket> getVbuckets()
Specified by:
getVbuckets in interface Config

compareTo

public ConfigDifference compareTo(Config config)
Specified by:
compareTo in interface Config

getHashAlgorithm

public net.spy.memcached.HashAlgorithm getHashAlgorithm()
Specified by:
getHashAlgorithm in interface Config

getConfigType

public ConfigType getConfigType()
Specified by:
getConfigType in interface Config

getCouchServers

public java.util.List<java.net.URL> getCouchServers()
Specified by:
getCouchServers in interface Config


Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.