net.spy.memcached.vbucket.config
Class DefaultConfig
java.lang.Object
net.spy.memcached.vbucket.config.DefaultConfig
- All Implemented Interfaces:
- Config
public class DefaultConfig
- extends Object
- implements Config
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultConfig
public DefaultConfig(HashAlgorithm hashAlgorithm,
int serversCount,
int replicasCount,
int vbucketsCount,
List<String> servers,
List<VBucket> vbuckets)
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
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