public final class ArrayModNodeLocator extends java.lang.Object implements NodeLocator
| Constructor and Description |
|---|
ArrayModNodeLocator(java.util.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 |
|---|---|
java.util.Collection<MemcachedNode> |
getAll()
Get all memcached nodes.
|
MemcachedNode |
getPrimary(java.lang.String k)
Get the primary location for the given key.
|
NodeLocator |
getReadonlyCopy()
Create a read-only copy of this NodeLocator.
|
java.util.Iterator<MemcachedNode> |
getSequence(java.lang.String k)
Get an iterator over the sequence of nodes that make up the backup
locations for a given key.
|
void |
updateLocator(java.util.List<MemcachedNode> newNodes)
Update locator status.
|
public ArrayModNodeLocator(java.util.List<MemcachedNode> n, HashAlgorithm alg)
n - the array of nodesalg - the hash algorithmpublic java.util.Collection<MemcachedNode> getAll()
NodeLocatorgetAll in interface NodeLocatorpublic MemcachedNode getPrimary(java.lang.String k)
NodeLocatorgetPrimary in interface NodeLocatork - the object keypublic java.util.Iterator<MemcachedNode> getSequence(java.lang.String k)
NodeLocatorgetSequence in interface NodeLocatork - the object keypublic NodeLocator getReadonlyCopy()
NodeLocatorgetReadonlyCopy in interface NodeLocatorpublic void updateLocator(java.util.List<MemcachedNode> newNodes)
NodeLocatorupdateLocator in interface NodeLocatornewNodes - New locator nodes.Copyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.