Package org.jppf.node.policy
Class Preference
java.lang.Object
org.jppf.node.policy.ExecutionPolicy
org.jppf.node.policy.LogicalRule
org.jppf.node.policy.Preference
- All Implemented Interfaces:
Serializable
A policy which evaluates a set of policies ordered by preference.
- Author:
- Laurent Cohen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jppf.node.policy.ExecutionPolicy
ExecutionPolicy.AndRule, ExecutionPolicy.NotRule, ExecutionPolicy.OrRule, ExecutionPolicy.XorRule -
Field Summary
Fields inherited from class org.jppf.node.policy.ExecutionPolicy
children -
Constructor Summary
ConstructorsConstructorDescriptionPreference(List<ExecutionPolicy> policies) Initialize this policy with the specified array of children policies.Preference(ExecutionPolicy... policies) Initialize this policy with the specified array of children policies. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(PropertiesCollection<String> info) Determines whether this policy accepts the specified node.toString(int n) Print this object to a string.Methods inherited from class org.jppf.node.policy.LogicalRule
checkRulesMethods inherited from class org.jppf.node.policy.ExecutionPolicy
and, and, andNot, andNot, evaluate, getChildren, getContext, getProperty, indent, negate, not, Not, or, or, orNot, orNot, setContext, setContext, tagEnd, tagStart, toString, toXML, xmlElement, xmlElement, xor, xor
-
Constructor Details
-
Preference
Initialize this policy with the specified array of children policies.- Parameters:
policies- the polcies in order of preference.
-
Preference
Initialize this policy with the specified array of children policies.- Parameters:
policies- the polcies in order of preference.
-
-
Method Details
-
accepts
Description copied from class:ExecutionPolicyDetermines whether this policy accepts the specified node. This method must be overriden in subclasses.- Specified by:
acceptsin classExecutionPolicy- Parameters:
info- system information for the node on which the tasks will run if accepted.- Returns:
- true if the node is accepted, false otherwise.
-
toString
Description copied from class:LogicalRulePrint this object to a string.- Overrides:
toStringin classLogicalRule- Parameters:
n- the size of the indent to startwith.- Returns:
- an XML string representation of this object
-