Class NodeLocatorHelper


  • @Uncommitted
    @Public
    public class NodeLocatorHelper
    extends Object
    Helper class to provide direct access on how document IDs are mapped onto nodes.
    Since:
    2.1.0
    Author:
    Michael Nitschinger
    • Method Detail

      • activeNodeForId

        public InetAddress activeNodeForId​(String id)
        Returns the target active node InetAddress for a given document ID on the bucket.
        Parameters:
        id - the document id to convert.
        Returns:
        the node for the given document id.
      • replicaNodesForId

        public List<InetAddress> replicaNodesForId​(String id)
        Returns all target replica nodes InetAddress for a given document ID on the bucket.
        Parameters:
        id - the document id to convert.
        Returns:
        the node for the given document id.
      • replicaNodeForId

        public InetAddress replicaNodeForId​(String id,
                                            int replicaNum)
        Returns the target replica node InetAddress for a given document ID and replica number on the bucket.
        Parameters:
        id - the document id to convert.
        replicaNum - the replica number.
        Returns:
        the node for the given document id.
      • nodes

        public List<InetAddress> nodes()
        Returns all nodes known in the current config.
        Returns:
        all currently known nodes.