public class DefaultInfrastructureManager extends InfrastructureManager
InfrastructureManager.PersistedInfraVariablesHandler<T>, InfrastructureManager.RMDeployingNodeAccessor
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger
logger
|
ELASTIC, nodeSource, persistedInfraVariables, readLock, RM_URL_KEY, writeLock
Constructor and Description |
---|
DefaultInfrastructureManager()
Proactive default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acquireAllNodes()
Asynchronous request of all nodes acquisition.
|
void |
acquireNode()
Asynchronous node acquisition request.
|
void |
configure(Object... parameters)
Adds information required to deploy nodes in the future.
|
String |
getDescription()
Node source description
|
protected void |
initializePersistedInfraVariables()
This method should initialize a value in the runtime variables map for all the runtime variables that will be
used in the class.
|
boolean |
isThereNodesInSameJVM(org.objectweb.proactive.core.node.Node node)
Check if there are any other nodes handled by the NodeSource in the same
JVM of the node passed in parameter.
|
void |
notifyAcquiredNode(org.objectweb.proactive.core.node.Node node)
Notifies the implementation of the infrastructure manager that a new node
has been registered.
|
void |
notifyDownNode(String nodeName,
String nodeUrl,
org.objectweb.proactive.core.node.Node proactiveProgrammingNode)
Define what needs to be done in an infrastructure implementation when a node is detected as down.
|
void |
onDownNodeReconnection(org.objectweb.proactive.core.node.Node node)
Called by the system every time a node that is DOWN reconnects
and changes its status to FREE or BUSY.
|
void |
removeDownNodePriorToNotify(String nodeName)
This method can be overriden by subclasses, especially if they do not
want the node to be removed from the InfrastructureManager map when
detected as down.
|
void |
removeNode(org.objectweb.proactive.core.node.Node node)
Removes the node from the resource manager.
|
void |
shutDown()
Notify this infrastructure it is going to be shut down along with its
nodesource.
|
String |
toString()
Node source string representation
|
acquireAllNodes, acquireNodes, acquireNodes, addDeployingNode, addDeployingNodeWithLockAndPersist, addLostNodeWithLockAndPersist, addMultipleDeployingNodes, buildDeployingNodeURL, checkAllNodesAreAcquiredAndDo, checkNodeIsAcquiredAndDo, declareDeployingNodeLost, getDefaultCommandLineBuilder, getDeployingAndLostNodes, getDeployingNodesWithLock, getDeployingOrLostNode, getEmptyCommandLineBuilder, getLostNodesWithLock, getMeta, getPersistedDeployingNodesUrl, getPersistedInfraVariable, getPersistedLostNodesUrl, getRmUrl, getSectionDescriptions, internalConfigure, internalNotifyDownNode, internalRegisterAcquiredNode, internalRemoveDeployingNode, internalRemoveNode, internalShutDown, isShutDown, isUsingDeployingNode, multipleDeclareDeployingNodeLost, notifyDeployingNodeLost, persistInfrastructureVariables, reconfigure, recoverPersistedInfraVariables, searchForNotAcquiredRmNode, setNodeSource, setPersistedInfraVariable, setPersistedNodeSourceData, setRmDbManager, setRmUrl, update, updateDeployingNodeDescription
public DefaultInfrastructureManager()
public void configure(Object... parameters)
configure
in class InfrastructureManager
parameters
- of the infrastructure managerpublic void acquireNode()
InfrastructureManager.internalRegisterAcquiredNode(Node)
acquireNode
in class InfrastructureManager
public void acquireAllNodes()
InfrastructureManager.internalRegisterAcquiredNode(Node)
acquireAllNodes
in class InfrastructureManager
public void removeNode(org.objectweb.proactive.core.node.Node node) throws RMException
removeNode
in class InfrastructureManager
node
- the node to release.RMException
- if any problems occurred.public String toString()
public String getDescription()
getDescription
in class InfrastructureManager
public boolean isThereNodesInSameJVM(org.objectweb.proactive.core.node.Node node)
node
- Node to check if there any other node of the NodeSource in the
same JVMpublic void notifyAcquiredNode(org.objectweb.proactive.core.node.Node node) throws RMException
InfrastructureManager.addDeployingNode(String, String, String, long)
was made), and is called only for deploying nodes for which one no
timeout occurred.notifyAcquiredNode
in class InfrastructureManager
node
- the newly registered nodeRMException
- if the implementation does not approve the node acquisition
requestpublic void notifyDownNode(String nodeName, String nodeUrl, org.objectweb.proactive.core.node.Node proactiveProgrammingNode) throws RMException
notifyDownNode
in class InfrastructureManager
proactiveProgrammingNode
- the ProActive Programming Node that is down.RMException
- if any problems occurred.public void onDownNodeReconnection(org.objectweb.proactive.core.node.Node node)
InfrastructureManager
onDownNodeReconnection
in class InfrastructureManager
node
- the node that has reconnected.public void removeDownNodePriorToNotify(String nodeName)
InfrastructureManager
removeDownNodePriorToNotify
in class InfrastructureManager
nodeName
- the node to removepublic void shutDown()
shutDown
in class InfrastructureManager
protected void initializePersistedInfraVariables()
InfrastructureManager
InfrastructureManager.configure(Object...)
method.
This method runs with the write lock acquired.initializePersistedInfraVariables
in class InfrastructureManager