API Reference 0.4.0memcached_clientNodeLocator

NodeLocator abstract class

Locating a node by hash value.

abstract class NodeLocator {
 /**
  * Get the primary node per the given key.
  */
 MemcachedNode getPrimary(String key);

 /**
  * Get the Iterator<MemcachedNode> of backup nodes per the given key.
  */
 Iterator<MemcachedNode> getSequence(String key);

 /**
  * Get all memcached nodes; useful for broadcasting messages.
  */
 Iterable<MemcachedNode> get allNodes;

 /**
  * Update locator status.
  */
 void updateLocator(Iterable<MemcachedNode> nodes);
}

Subclasses

ArrayModNodeLocator, KetamaNodeLocator, VbucketNodeLocator

Properties

final Iterable<MemcachedNode> allNodes #

Get all memcached nodes; useful for broadcasting messages.

Iterable<MemcachedNode> get allNodes;

Methods

abstract MemcachedNode getPrimary(String key) #

Get the primary node per the given key.

abstract Iterator<MemcachedNode> getSequence(String key) #

Get the Iterator<MemcachedNode> of backup nodes per the given key.

abstract void updateLocator(Iterable<MemcachedNode> nodes) #

Update locator status.