@Override public void updateLocator(List<MemcachedNode> nodes) { allNodes = nodes; setKetamaNodes(nodes); }
/** * Create a new KetamaNodeLocator with specific nodes, hash, node key format, * and weight * * @param nodes The List of nodes to use in the Ketama consistent hash * continuum * @param alg The hash algorithm to use when choosing a node in the Ketama * consistent hash continuum * @param nodeWeights node weights for ketama, a map from InetSocketAddress to * weight as Integer * @param configuration node locator configuration */ public RefinedKetamaNodeLocator(List<MemcachedNode> nodes, HashAlgorithm alg, Map<InetSocketAddress, Integer> nodeWeights, KetamaNodeLocatorConfiguration configuration) { super(); allNodes = nodes; hashAlg = alg; config = configuration; weights = nodeWeights; isWeightedKetama = !weights.isEmpty(); setKetamaNodes(nodes); }
@Override public void updateLocator(List<MemcachedNode> nodes) { allNodes = nodes; setKetamaNodes(nodes); }
/** * Create a new KetamaNodeLocator with specific nodes, hash, node key format, * and weight * * @param nodes The List of nodes to use in the Ketama consistent hash * continuum * @param alg The hash algorithm to use when choosing a node in the Ketama * consistent hash continuum * @param nodeWeights node weights for ketama, a map from InetSocketAddress to * weight as Integer * @param configuration node locator configuration */ public RefinedKetamaNodeLocator(List<MemcachedNode> nodes, HashAlgorithm alg, Map<InetSocketAddress, Integer> nodeWeights, KetamaNodeLocatorConfiguration configuration) { super(); allNodes = nodes; hashAlg = alg; config = configuration; weights = nodeWeights; isWeightedKetama = !weights.isEmpty(); setKetamaNodes(nodes); }