java.lang.Object
com.pervasive.datarush.cal.VirtualNodeID
- All Implemented Interfaces:
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VirtualNodeIDThe virtual node of typeVirtualNodeType.MASTER. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic VirtualNodeIDforDistributedWorker(String physicalNodeID, int offset) Creates a distributed worker node idstatic VirtualNodeIDforPseudoDistributedWorker(int offset) Creates a pseudo-distributed worker node idgetID()Returns the unique id.intReturns the offset within the physical node.Returns the physical node on which this virtual node resides.getType()Returns the type of this nodeinthashCode()toString()
-
Field Details
-
MASTER
The virtual node of typeVirtualNodeType.MASTER. Has no physical node id or offset.
-
-
Method Details
-
forPseudoDistributedWorker
Creates a pseudo-distributed worker node id- Parameters:
offset- the offset- Returns:
- a new pseudo-distributed worker node id
-
forDistributedWorker
Creates a distributed worker node id- Parameters:
physicalNodeID- the worker physical node idoffset- the offset- Returns:
- a new distributed worker node id
-
getID
Returns the unique id. This will be one of the following forms:clientembeddedmaster-physicalidworker-physicalid-offset
- Returns:
- the unique id
-
getType
Returns the type of this node- Returns:
- the type of this node
-
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() -
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<VirtualNodeID>
-