public abstract class NodeSourcePolicy extends Object implements NodeSourcePlugin
NOTE: NodeSourcePolicy will be an active object.
To define a new node source policy:
configure(Object...)
and setup there all policy parameters which are available through UIModifier and Type | Field and Description |
---|---|
protected NodeSource |
nodeSource
Node source of the policy
|
Constructor and Description |
---|
NodeSourcePolicy() |
Modifier and Type | Method and Description |
---|---|
protected void |
acquireAllNodes()
Asynchronous request to acquires all possible nodes from infrastructure
|
void |
acquireNodes(int n)
Asynchronous request to acquires n nodes from infrastructure
|
void |
acquireNodes(int n,
long timeout,
Map<String,?> nodeConfiguration) |
void |
acquireNodes(int n,
Map<String,?> nodeConfiguration) |
abstract org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
activate()
Activates the policy.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
configure(Object... policyParameters)
Configure a policy with given parameters.
|
protected void |
debug(String message)
Prints a formatted debug message to the logging system
|
abstract String |
getDescription()
Policy description for UI
|
Map<String,String> |
getMeta() |
AccessType |
getProviderAccessType()
Returns a node source administration type.
|
Map<Integer,String> |
getSectionDescriptions() |
AccessType |
getUserAccessType()
Returns a nodes access type.
|
protected void |
info(String message)
Prints a formatted info message to the logging system
|
void |
reconfigure(Object... updatedPolicyParameters)
Reconfigure a policy (potentially running) with the given parameters.
|
protected void |
removeAllNodes(boolean preemptive)
Removed all nodes from the node source
|
protected void |
removeNode(String url,
boolean preemptive)
Removes a node from the node source
|
protected void |
removeNodes(int n,
boolean preemptive)
Removes n nodes from the node source
|
void |
setNodeSource(NodeSource nodeSource)
Sets a policy node source
|
void |
shutdown(Client initiator)
Shutdown the policy
|
String |
toString()
Policy string representation.
|
protected NodeSource nodeSource
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper configure(Object... policyParameters)
policyParameters
- parameters defined by userIllegalArgumentException
- if parameters are incorrectpublic void reconfigure(Object... updatedPolicyParameters) throws Exception
updatedPolicyParameters
- parameters potentially containing updated dynamic
parametersIllegalArgumentException
- if parameters are incorrectException
Configurable.dynamic()
public abstract org.objectweb.proactive.core.util.wrapper.BooleanWrapper activate()
public void shutdown(Client initiator)
public abstract String getDescription()
public void setNodeSource(NodeSource nodeSource)
nodeSource
- policy node sourcepublic void acquireNodes(int n)
n
- number of nodesprotected void acquireAllNodes()
protected void removeNodes(int n, boolean preemptive)
n
- number of nodespreemptive
- if true remove nodes immediately without waiting while they will be freedprotected void removeNode(String url, boolean preemptive)
url
- the URL of the nodepreemptive
- if true remove nodes immediately without waiting while they will be freedprotected void removeAllNodes(boolean preemptive)
preemptive
- if true remove nodes immediately without waiting while they will be freedprotected void info(String message)
message
- to printprotected void debug(String message)
message
- to printpublic AccessType getProviderAccessType()
public AccessType getUserAccessType()
public Map<Integer,String> getSectionDescriptions()
getSectionDescriptions
in interface NodeSourcePlugin
public Map<String,String> getMeta()
getMeta
in interface NodeSourcePlugin