Java源码示例:net.spy.memcached.NodeLocator
示例1
public NodeLocator getReadonlyCopy() {
final TreeMap<Long, MemcachedNode> ketamaNaodes = new TreeMap<Long, MemcachedNode>(getKetamaNodes());
final Collection<MemcachedNode> aNodes = new ArrayList<MemcachedNode>(allNodes.size());
// Rewrite the values a copy of the map.
for (Map.Entry<Long, MemcachedNode> me : ketamaNaodes.entrySet()) {
me.setValue(new EVCacheMemcachedNodeROImpl(me.getValue()));
}
// Copy the allNodes collection.
for (MemcachedNode n : allNodes) {
aNodes.add(new EVCacheMemcachedNodeROImpl(n));
}
return new EVCacheNodeLocator(client, ketamaNaodes, aNodes, hashingAlgorithm, config);
}
示例2
@Override
public NodeLocator createLocator(List<MemcachedNode> nodes) {
return underlying.createLocator(nodes);
}
示例3
@Override
public NodeLocator createLocator(List<MemcachedNode> nodes) {
return underlying.createLocator(nodes);
}
示例4
public NodeLocator getNodeLocator() {
return this.evcacheMemcachedClient.getNodeLocator();
}
示例5
public NodeLocator createLocator(List<MemcachedNode> list) {
this.locator = new EVCacheNodeLocator(client, list,
DefaultHashAlgorithm.KETAMA_HASH, new EVCacheKetamaNodeLocatorConfiguration(client));
return locator;
}
示例6
public NodeLocator createLocator(List<MemcachedNode> list) {
this.locator = new EVCacheNodeLocator(client, list, DefaultHashAlgorithm.KETAMA_HASH, new EVCacheKetamaNodeLocatorConfiguration(client));
return locator;
}
示例7
@Override
public NodeLocator createLocator(List<MemcachedNode> list) {
this.locator = new EVCacheNodeLocator(client, list, DefaultHashAlgorithm.KETAMA_HASH, new DIEVCacheKetamaNodeLocatorConfiguration(client, eurekaClient));
return locator;
}
示例8
@Override
public NodeLocator createLocator(List<MemcachedNode> list) {
this.locator = new EVCacheNodeLocator(client, list, DefaultHashAlgorithm.KETAMA_HASH, new DIEVCacheKetamaNodeLocatorConfiguration(client, eurekaClient));
return locator;
}