- 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 VirtualNodeIDMASTERThe virtual node of typeVirtualNodeType.MASTER. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(VirtualNodeID o)booleanequals(Object obj)static VirtualNodeIDforDistributedWorker(String physicalNodeID, int offset)Creates a distributed worker node idstatic VirtualNodeIDforPseudoDistributedWorker(int offset)Creates a pseudo-distributed worker node idStringgetID()Returns the unique id.intgetOffset()Returns the offset within the physical node.StringgetPhysicalNodeID()Returns the physical node on which this virtual node resides.VirtualNodeTypegetType()Returns the type of this nodeinthashCode()StringtoString() 
 - 
 
- 
- 
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:clientembeddedmaster-physicalidworker-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:
 compareToin interfaceComparable<VirtualNodeID>
 
 - 
 
 -