
Classes | |
| class | NodeIterator |
Public Member Functions | |
| ArrayModNodeLocator (List< MemcachedNode > n, HashAlgorithm alg) | |
| Collection< MemcachedNode > | getAll () |
| MemcachedNode | getPrimary (String k) |
| Iterator< MemcachedNode > | getSequence (String k) |
Package Attributes | |
| final MemcachedNode[] | nodes |
Private Member Functions | |
| int | getServerForKey (String key) |
Private Attributes | |
| final HashAlgorithm | hashAlg |
| ArrayModNodeLocator | ( | List< MemcachedNode > | n, | |
| HashAlgorithm | alg | |||
| ) |
Construct an ArraymodNodeLocator over the given array of nodes and using the given hash algorithm.
| n | the array of nodes | |
| alg | the hash algorithm |
| Collection<MemcachedNode> getAll | ( | ) |
Get all memcached nodes. This is useful for broadcasting messages.
Implements NodeLocator.
| MemcachedNode getPrimary | ( | String | k | ) |
Get the primary location for the given key.
| k | the object key |
Implements NodeLocator.
| Iterator<MemcachedNode> getSequence | ( | String | k | ) |
Get an iterator over the sequence of nodes that make up the backup locations for a given key.
| k | the object key |
Implements NodeLocator.
| int getServerForKey | ( | String | key | ) | [private] |
final HashAlgorithm hashAlg [private] |
final MemcachedNode [] nodes [package] |
1.5.8