Module datarush.commons
Package com.pervasive.datarush.cal
Class NodeAllocationState.AssignmentState
- java.lang.Object
-
- com.pervasive.datarush.cal.NodeAllocationState.AssignmentState
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- NodeAllocationState
public static final class NodeAllocationState.AssignmentState extends Object implements Serializable
Assignment details for a particular node ID.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static NodeAllocationState.AssignmentState
MASTER
The master assignment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeAllocationState.AssignmentState
assign(VirtualNodeID newID)
Create a new assignment, re-assigned to the new nodeboolean
equals(Object o)
VirtualNodeID
getCurrentNodeID()
The node ID that this assignment is currently on.NodeAllocationPlan.AssignmentPlan
getOriginalAssignment()
Returns the original assignment associated with this assignmentVirtualNodeID
getOriginalNodeID()
The node ID that this assignment was originally on.int
getPartitionID()
The partition instance info for this assignmentVirtualNodeType
getType()
Returns the node typeint
hashCode()
static NodeAllocationState.AssignmentState
initial(NodeAllocationPlan.AssignmentPlan originalAssignment)
Creates an initial assignment state for the given assignmentString
toString()
-
-
-
Field Detail
-
MASTER
public static final NodeAllocationState.AssignmentState MASTER
The master assignment. Partition id is always zero.
-
-
Method Detail
-
initial
public static NodeAllocationState.AssignmentState initial(NodeAllocationPlan.AssignmentPlan originalAssignment)
Creates an initial assignment state for the given assignment- Parameters:
originalAssignment
- the original assignment- Returns:
- an initial assignment state for the given assignment
-
getOriginalAssignment
public NodeAllocationPlan.AssignmentPlan getOriginalAssignment()
Returns the original assignment associated with this assignment- Returns:
-
getOriginalNodeID
public VirtualNodeID getOriginalNodeID()
The node ID that this assignment was originally on.- Returns:
- the node ID that this assignment was originally on.
-
getCurrentNodeID
public VirtualNodeID getCurrentNodeID()
The node ID that this assignment is currently on. (Will differ from original node id in the event of a failure)- Returns:
- the node ID that this assignment is currently on
-
getPartitionID
public final int getPartitionID()
The partition instance info for this assignment- Returns:
- the partition instance info for this assignment
-
assign
public NodeAllocationState.AssignmentState assign(VirtualNodeID newID)
Create a new assignment, re-assigned to the new node- Parameters:
newID
- the new nodeID- Returns:
- a new assignment
-
getType
public VirtualNodeType getType()
Returns the node type- Returns:
- the node type
-
-