Interface NodeLocator

All Known Implementing Classes:
ArrayModNodeLocator, KetamaNodeLocator

public interface NodeLocator
Interface for locating a node by hash value.
  • Method Details

    • getPrimary

      MemcachedNode getPrimary(String k)
      Get the primary location for the given key.
      Parameters:
      k - the object key
      Returns:
      the QueueAttachment containing the primary storage for a key
    • getSequence

      Iterator<MemcachedNode> getSequence(String k)
      Get an iterator over the sequence of nodes that make up the backup locations for a given key.
      Parameters:
      k - the object key
      Returns:
      the sequence of backup nodes.
    • getAll

      Get all memcached nodes. This is useful for broadcasting messages.
    • getReadonlyCopy

      NodeLocator getReadonlyCopy()
      Create a read-only copy of this NodeLocator.
    • updateLocator

      void updateLocator(List<MemcachedNode> nodes)
      Update locator status.
      Parameters:
      nodes - New locator nodes.