net.spy.memcached.vbucket.config
Class CacheConfig

java.lang.Object
  extended by net.spy.memcached.vbucket.config.CacheConfig
All Implemented Interfaces:
Config

public class CacheConfig
extends Object
implements Config


Constructor Summary
CacheConfig(int serversCount)
           
 
Method Summary
 ConfigDifference compareTo(Config config)
           
 int foundIncorrectMaster(int vbucket, int wrongServer)
           
 ConfigType getConfigType()
           
 HashAlgorithm getHashAlgorithm()
           
 int getMaster(int vbucketIndex)
           
 int getReplica(int vbucketIndex, int replicaIndex)
           
 int getReplicasCount()
           
 String getServer(int serverIndex)
           
 List<String> getServers()
           
 int getServersCount()
           
 int getVbucketByKey(String key)
           
 List<VBucket> getVbuckets()
           
 int getVbucketsCount()
           
 void setServers(List<String> servers)
           
 void setVbuckets(List<VBucket> vbuckets)
           
 
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 String getServer(int serverIndex)
Specified by:
getServer in interface Config

getVbucketByKey

public int getVbucketByKey(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(List<String> servers)

setVbuckets

public void setVbuckets(List<VBucket> vbuckets)

getServers

public List<String> getServers()
Specified by:
getServers in interface Config

getVbuckets

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

compareTo

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

getHashAlgorithm

public HashAlgorithm getHashAlgorithm()
Specified by:
getHashAlgorithm in interface Config

getConfigType

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