public abstract class ExecutionPolicy extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ExecutionPolicy.AndRule
An execution policy that realizes a logical "AND" combination of multiple policies specified as operands.
|
static class |
ExecutionPolicy.LogicalRule
An execution policy that realizes a binary logical combination of the policies specified as operands.
|
static class |
ExecutionPolicy.NotRule
An execution policy that realizes the negation of a policy specified as operand.
|
static class |
ExecutionPolicy.OrRule
An execution policy that realizes a logical "OR" combination of multiple policies specified as operands.
|
static class |
ExecutionPolicy.XorRule
An execution policy that realizes a logical "XOR" combination of multiple policies specified as operands.
|
Modifier | Constructor and Description |
---|---|
protected |
ExecutionPolicy(ExecutionPolicy... children)
Initialize this policy with the specified children.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
accepts(PropertiesCollection info)
Determines whether this policy accepts the specified node.
|
ExecutionPolicy |
and(ExecutionPolicy... rules)
Create an execution policy that is a logical "AND" combination of this policy and those specified as operands.
|
ExecutionPolicy |
and(ExecutionPolicy rule)
Create an execution policy that is a logical "AND" combination of this policy and the one specified as operand.
|
ExecutionPolicy |
andNot(ExecutionPolicy... rules)
Create an execution policy that is a logical "AND" combination of this policy and the negations of those specified as argumens.
|
ExecutionPolicy |
andNot(ExecutionPolicy rule)
Create an execution policy that is a logical "NOT" combination of this policy and the negations of the one specified as argument.
|
PolicyContext |
getContext()
Get the context for this policy.
|
String |
getProperty(PropertiesCollection info,
String name)
Get the value of the specified property in the specified set of system information.
|
ExecutionPolicy |
not()
Create an execution policy that is a negation of this policy.
|
static ExecutionPolicy |
Not(ExecutionPolicy policy)
A convenience method to provide a way to negate a policy that is consistent with the execution policy DSL.
|
ExecutionPolicy |
or(ExecutionPolicy... rules)
Create an execution policy that is a logical "OR" combination of this policy and those specified as operands.
|
ExecutionPolicy |
or(ExecutionPolicy rule)
Create an execution policy that is a logical "OR" combination of this policy and the one specified as operand.
|
ExecutionPolicy |
orNot(ExecutionPolicy... rules)
Create an execution policy that is a logical "OR" combination of this policy and the negations of those specified as arguments.
|
ExecutionPolicy |
orNot(ExecutionPolicy rule)
Create an execution policy that is a logical "OR" combination of this policy and the negations of the one specified as argument.
|
ExecutionPolicy |
xor(ExecutionPolicy... rules)
Create an execution policy that is a logical "XOR" combination of the this policy and those specified as operands.
|
ExecutionPolicy |
xor(ExecutionPolicy rule)
Create an execution policy that is a logical "XOR" combination of this policy and the one specified as operand.
|
protected ExecutionPolicy(ExecutionPolicy... children)
children
- the children of this policy.public abstract boolean accepts(PropertiesCollection info)
info
- system information for the node on which the tasks will run if accepted.public ExecutionPolicy and(ExecutionPolicy rule)
rule
- the rule to combine this one with.public ExecutionPolicy and(ExecutionPolicy... rules)
rules
- rules to combine this one with.public ExecutionPolicy andNot(ExecutionPolicy rule)
rule
- the rule to combine this one with.public ExecutionPolicy andNot(ExecutionPolicy... rules)
rules
- rules to combine this one with.public ExecutionPolicy or(ExecutionPolicy rule)
rule
- the rule to combine this one with.public ExecutionPolicy or(ExecutionPolicy... rules)
rules
- rules to combine this one with.public ExecutionPolicy orNot(ExecutionPolicy rule)
rule
- rules to combine this one with.public ExecutionPolicy orNot(ExecutionPolicy... rules)
rules
- rules to combine this one with.public ExecutionPolicy xor(ExecutionPolicy rule)
rule
- the rule to combine this one with.public ExecutionPolicy xor(ExecutionPolicy... rules)
rules
- rules to combine this one with.public ExecutionPolicy not()
public String getProperty(PropertiesCollection info, String name)
info
- the system information in which to lookup the property.name
- the name of the property to look for.public static ExecutionPolicy Not(ExecutionPolicy policy)
policy
- the policy to negate.null
if the specified policy was null
.public PolicyContext getContext()
PolicyContext
object.Copyright © 2005-2016 JPPF Team.