public abstract class AbstractRMNode extends Object implements RMNode, Serializable
RMDeployingNode
,
RMNodeImpl
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected RMNodeEvent |
addEvent
The add event
|
protected boolean |
isLocked
Status associated to a ProActive Node.
|
protected RMNodeEvent |
lastEvent
The last event
|
protected Client |
lockedBy
Defines who has locked the node.
|
protected long |
lockTime
Defines the time at which the node has been locked.
|
protected String |
nodeName
Name of the node
|
protected NodeSource |
nodeSource
NodeSource Stub that handles the node |
protected String |
nodeSourceName
Name of the NodeSource that handles the RMNode
|
protected Client |
provider
client registered the node in the resource manager
|
protected NodeState |
state
State of the node
|
protected long |
stateChangeTime
Time stamp of the latest state change
|
protected Map<String,String> |
usageInfo |
Constructor and Description |
---|
AbstractRMNode() |
AbstractRMNode(NodeSource nodeSource,
String nodeName,
String nodeURL,
Client provider) |
Modifier and Type | Method and Description |
---|---|
protected void |
changeState(NodeState newState) |
void |
copyLockStatusFrom(RMNode node) |
RMNodeEvent |
createNodeEvent() |
RMNodeEvent |
createNodeEvent(RMEventType eventType,
NodeState previousNodeState,
String initiator) |
boolean |
equals(Object rmNode) |
RMNodeEvent |
getAddEvent()
Returns the id of the add event
RMNodeEvent . |
RMNodeEvent |
getLastEvent()
Returns the id of the last event
RMNodeEvent . |
Client |
getLockedBy()
Returns the client who has locked the node.
|
protected String |
getLockStatus() |
long |
getLockTime()
Returns the timestamp at which the node has been locked.
|
String |
getNodeName()
Returns the name of the node.
|
NodeSource |
getNodeSource()
Returns the Stub of the
NodeSource that handles the node. |
String |
getNodeSourceName()
Returns the NodeSource name of the node.
|
String |
getNodeURL()
Returns the unique ID of the node.
|
Client |
getProvider()
Gets the provider of the node (who created and deployed it)
|
NodeState |
getState()
Returns the node state
|
long |
getStateChangeTime()
Returns the time of the last node state change.
|
Map<String,String> |
getUsageInfo() |
int |
hashCode() |
boolean |
isLocked()
Returns a boolean saying whether the node is locked or not.
|
void |
lock(Client client)
Set the node locked.
|
long |
millisSinceStateChanged() |
void |
setAddEvent(RMNodeEvent addEvent) |
void |
setLastEvent(RMNodeEvent lastEvent) |
void |
setNodeSource(NodeSource nodeSource)
Sets the Stub of the NodeSource to the specified value.
|
void |
setStateChangeTime(long time) |
void |
setUsageInfo(Map<String,String> usageInfo) |
protected RMNodeDescriptor |
toNodeDescriptor() |
String |
toString() |
void |
unlock(Client client)
Unlock the node.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addToken, clean, executeScript, getAdminPermission, getDescriptorVMName, getHostName, getJMXUrl, getJmxUrls, getNode, getNodeInfo, getNodeTags, getNodeTokens, getOwner, getScriptStatus, getUserPermission, getVNodeName, isBusy, isConfiguring, isDeploying, isDown, isFree, isProtectedByToken, isToRemove, removeToken, setBusy, setBusy, setConfiguring, setDown, setFree, setJMXUrl, setNodeTags, setNodeTokens, setProtectedByToken, setToRemove
compareTo
protected RMNodeEvent addEvent
protected volatile boolean isLocked
protected RMNodeEvent lastEvent
protected volatile Client lockedBy
isLocked
is true
only.protected volatile long lockTime
isLocked
is true
only.protected final String nodeName
protected NodeSource nodeSource
NodeSource
Stub that handles the nodeprotected String nodeSourceName
protected Client provider
protected NodeState state
protected long stateChangeTime
public AbstractRMNode()
public AbstractRMNode(NodeSource nodeSource, String nodeName, String nodeURL, Client provider)
public void copyLockStatusFrom(RMNode node)
public RMNodeEvent createNodeEvent()
createNodeEvent
in interface RMNode
public RMNodeEvent createNodeEvent(RMEventType eventType, NodeState previousNodeState, String initiator)
createNodeEvent
in interface RMNode
protected void changeState(NodeState newState)
public void lock(Client client)
public void unlock(Client client)
public RMNodeEvent getAddEvent()
RMNodeEvent
.getAddEvent
in interface RMNode
public RMNodeEvent getLastEvent()
RMNodeEvent
.getLastEvent
in interface RMNode
public long getLockTime()
The value returned by this method is meaningful when the node is locked only.
getLockTime
in interface RMNode
-1
if the node is not locked.RMNode.isLocked()
public Client getLockedBy()
getLockedBy
in interface RMNode
null
if the node is not locked.protected String getLockStatus()
public String getNodeName()
getNodeName
in interface RMNode
public NodeSource getNodeSource()
NodeSource
that handles the node.getNodeSource
in interface RMNode
NodeSource
that handles the node.public String getNodeSourceName()
getNodeSourceName
in interface RMNode
public NodeState getState()
public long getStateChangeTime()
getStateChangeTime
in interface RMNode
public String getNodeURL()
getNodeURL
in interface RMNode
public Client getProvider()
getProvider
in interface RMNode
public boolean isLocked()
public void setAddEvent(RMNodeEvent addEvent)
setAddEvent
in interface RMNode
public void setLastEvent(RMNodeEvent lastEvent)
setLastEvent
in interface RMNode
public void setNodeSource(NodeSource nodeSource)
setNodeSource
in interface RMNode
nodeSource
- the new NodeSource Stub to use.protected RMNodeDescriptor toNodeDescriptor()
public long millisSinceStateChanged()
millisSinceStateChanged
in interface RMNode
public Map<String,String> getUsageInfo()
getUsageInfo
in interface RMNode
public void setUsageInfo(Map<String,String> usageInfo)
setUsageInfo
in interface RMNode
public void setStateChangeTime(long time)
setStateChangeTime
in interface RMNode