public class LocalInfrastructure extends InfrastructureManager
InfrastructureManager.PersistedInfraVariablesHandler<T>, InfrastructureManager.RMDeployingNodeAccessor
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_NODE_NUMBER |
static long |
DEFAULT_TIMEOUT |
ELASTIC, logger, nodeSource, persistedInfraVariables, readLock, RM_URL_KEY, writeLock
Constructor and Description |
---|
LocalInfrastructure() |
Modifier and Type | Method and Description |
---|---|
void |
acquireAllNodes()
Asynchronous request of all nodes acquisition.
|
void |
acquireNode()
Asynchronous node acquisition request.
|
void |
acquireNodes(int numberOfNodes,
Map<String,?> nodeConfiguration)
Asynchronous node acquisition request.
|
protected void |
configure(Object... args)
args[0] = credentials args[1] = max nodes args[2] = timeout args[3] = pa
props
|
String |
getDescription() |
Map<String,String> |
getMeta() |
Map<Integer,String> |
getSectionDescriptions() |
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.
|
protected void |
notifyAcquiredNode(org.objectweb.proactive.core.node.Node node)
Notifies the implementation of the infrastructure manager that a new node
has been registered.
|
protected void |
notifyDeployingNodeLost(String pnURL)
Notifies the user that the deploying node was lost or removed (because of
a timeout, user interaction...) Default empty implementation is provided
because implementors don't necessary use this feature.
|
void |
notifyDownNode(String nodeName,
String nodeUrl,
org.objectweb.proactive.core.node.Node node)
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 |
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() |
acquireAllNodes, acquireNodes, addDeployingNode, addDeployingNodeWithLockAndPersist, addLostNodeWithLockAndPersist, addMultipleDeployingNodes, buildDeployingNodeURL, checkAllNodesAreAcquiredAndDo, checkNodeIsAcquiredAndDo, declareDeployingNodeLost, getDefaultCommandLineBuilder, getDeployingAndLostNodes, getDeployingNodesWithLock, getDeployingOrLostNode, getEmptyCommandLineBuilder, getLostNodesWithLock, getPersistedDeployingNodesUrl, getPersistedInfraVariable, getPersistedLostNodesUrl, getRmUrl, internalConfigure, internalNotifyDownNode, internalRegisterAcquiredNode, internalRemoveDeployingNode, internalRemoveNode, internalShutDown, isShutDown, isUsingDeployingNode, multipleDeclareDeployingNodeLost, persistInfrastructureVariables, reconfigure, recoverPersistedInfraVariables, removeDownNodePriorToNotify, searchForNotAcquiredRmNode, setNodeSource, setPersistedInfraVariable, setPersistedNodeSourceData, setRmDbManager, setRmUrl, update, updateDeployingNodeDescription
public static final int DEFAULT_NODE_NUMBER
public static final long DEFAULT_TIMEOUT
public String getDescription()
getDescription
in class InfrastructureManager
public void acquireAllNodes()
InfrastructureManager
InfrastructureManager.internalRegisterAcquiredNode(Node)
acquireAllNodes
in class InfrastructureManager
public void acquireNode()
InfrastructureManager
InfrastructureManager.internalRegisterAcquiredNode(Node)
acquireNode
in class InfrastructureManager
public void acquireNodes(int numberOfNodes, Map<String,?> nodeConfiguration)
InfrastructureManager
acquireNodes
in class InfrastructureManager
numberOfNodes
- the number of nodes to acquirenodeConfiguration
- the configuration for nodes to be acquiredprotected void configure(Object... args)
configure
in class InfrastructureManager
args
- of the infrastructure managerprotected void notifyDeployingNodeLost(String pnURL)
notifyDeployingNodeLost
in class InfrastructureManager
pnURL
- the deploying node's URL for which one the timeout occurred.protected void notifyAcquiredNode(org.objectweb.proactive.core.node.Node node) throws RMException
InfrastructureManager
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 removeNode(org.objectweb.proactive.core.node.Node node) throws RMException
InfrastructureManager
removeNode
in class InfrastructureManager
node
- the node to release.RMException
- if any problems occurred.public void notifyDownNode(String nodeName, String nodeUrl, org.objectweb.proactive.core.node.Node node)
InfrastructureManager
notifyDownNode
in class InfrastructureManager
node
- the ProActive Programming Node that is down.public void onDownNodeReconnection(org.objectweb.proactive.core.node.Node node)
InfrastructureManager
onDownNodeReconnection
in class InfrastructureManager
node
- the node that has reconnected.public void shutDown()
InfrastructureManager
shutDown
in class InfrastructureManager
protected void initializePersistedInfraVariables()
InfrastructureManager
InfrastructureManager.configure(Object...)
method.
This method runs with the write lock acquired.initializePersistedInfraVariables
in class InfrastructureManager
public Map<Integer,String> getSectionDescriptions()
getSectionDescriptions
in interface NodeSourcePlugin
getSectionDescriptions
in class InfrastructureManager
public Map<String,String> getMeta()
getMeta
in interface NodeSourcePlugin
getMeta
in class InfrastructureManager