- java.lang.Object
-
- com.pervasive.datarush.cal.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:- type: the type of virtual node. may be a worker, client, or master
- physical ID: this is the node id of an actual machine in the cluster. Will be null for pseudo-distributed nodes.
- offset: an offset within the physical node.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static VirtualNodeID
MASTER
The virtual node of typeVirtualNodeType.MASTER
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(VirtualNodeID o)
boolean
equals(Object obj)
static VirtualNodeID
forDistributedWorker(String physicalNodeID, int offset)
Creates a distributed worker node idstatic VirtualNodeID
forPseudoDistributedWorker(int offset)
Creates a pseudo-distributed worker node idString
getID()
Returns the unique id.int
getOffset()
Returns the offset within the physical node.String
getPhysicalNodeID()
Returns the physical node on which this virtual node resides.VirtualNodeType
getType()
Returns the type of this nodeint
hashCode()
String
toString()
-
-
-
Field Detail
-
MASTER
public static final VirtualNodeID MASTER
The virtual node of typeVirtualNodeType.MASTER
. Has no physical node id or offset.
-
-
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 idoffset
- 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:client
embedded
master-physicalid
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.
-
compareTo
public int compareTo(VirtualNodeID o)
- Specified by:
compareTo
in interfaceComparable<VirtualNodeID>
-
-