public final class ArrayModNodeLocator extends Object implements NodeLocator
| Constructor and Description |
|---|
ArrayModNodeLocator(List<MemcachedNode> n,
HashAlgorithm alg)
Construct an ArraymodNodeLocator over the given array of nodes and using
the given hash algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<MemcachedNode> |
getAll()
Get all memcached nodes.
|
MemcachedNode |
getPrimary(String k)
Get the primary location for the given key.
|
NodeLocator |
getReadonlyCopy()
Create a read-only copy of this NodeLocator.
|
Iterator<MemcachedNode> |
getSequence(String k)
Get an iterator over the sequence of nodes that make up the backup
locations for a given key.
|
void |
updateLocator(List<MemcachedNode> newNodes)
Update locator status.
|
public ArrayModNodeLocator(List<MemcachedNode> n, HashAlgorithm alg)
n - the array of nodesalg - the hash algorithmpublic Collection<MemcachedNode> getAll()
NodeLocatorgetAll in interface NodeLocatorpublic MemcachedNode getPrimary(String k)
NodeLocatorgetPrimary in interface NodeLocatork - the object keypublic Iterator<MemcachedNode> getSequence(String k)
NodeLocatorgetSequence in interface NodeLocatork - the object keypublic NodeLocator getReadonlyCopy()
NodeLocatorgetReadonlyCopy in interface NodeLocatorpublic void updateLocator(List<MemcachedNode> newNodes)
NodeLocatorupdateLocator in interface NodeLocatornewNodes - New locator nodes.Copyright © 2025. All rights reserved.