Class VirtualNodeID

  • All Implemented Interfaces:
    Serializable, Comparable<VirtualNodeID>

    public final class VirtualNodeID
    extends Object
    implements Serializable, Comparable<VirtualNodeID>
    Identifies a "virtual node" in a cluster. In DataRush terms, a virtual node is a pipeline. A virtual node consists of the following components:
    1. type: the type of virtual node. may be a worker, client, or master
    2. physical ID: this is the node id of an actual machine in the cluster. Will be null for pseudo-distributed nodes.
    3. offset: an offset within the physical node.
    See Also:
    Serialized Form
    • Method Detail

      • forPseudoDistributedWorker

        public static VirtualNodeID forPseudoDistributedWorker​(int offset)
        Creates a pseudo-distributed worker node id
        Parameters:
        offset - the offset
        Returns:
        a new pseudo-distributed worker node id
      • forDistributedWorker

        public static VirtualNodeID forDistributedWorker​(String physicalNodeID,
                                                         int offset)
        Creates a distributed worker node id
        Parameters:
        physicalNodeID - the worker physical node id
        offset - the offset
        Returns:
        a new distributed worker node id
      • getID

        public String getID()
        Returns the unique id. This will be one of the following forms:
        1. client
        2. embedded
        3. master-physicalid
        4. worker-physicalid-offset
        Returns:
        the unique id
      • getType

        public VirtualNodeType getType()
        Returns the type of this node
        Returns:
        the type of this node
      • getPhysicalNodeID

        public String getPhysicalNodeID()
        Returns the physical node on which this virtual node resides.
        Returns:
        the physical node on which this virtual node resides.
      • getOffset

        public int getOffset()
        Returns the offset within the physical node.
        Returns:
        the offset within the physical node.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object