Class Preference

All Implemented Interfaces:
Serializable

public class Preference extends LogicalRule
A policy which evaluates a set of policies ordered by preference.
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • Preference

      public Preference(ExecutionPolicy... policies)
      Initialize this policy with the specified array of children policies.
      Parameters:
      policies - the polcies in order of preference.
    • Preference

      public Preference(List<ExecutionPolicy> policies)
      Initialize this policy with the specified array of children policies.
      Parameters:
      policies - the polcies in order of preference.
  • Method Details

    • accepts

      public boolean accepts(PropertiesCollection<String> info)
      Description copied from class: ExecutionPolicy
      Determines whether this policy accepts the specified node. This method must be overriden in subclasses.
      Specified by:
      accepts in class ExecutionPolicy
      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

      public String toString(int n)
      Description copied from class: LogicalRule
      Print this object to a string.
      Overrides:
      toString in class LogicalRule
      Parameters:
      n - the size of the indent to startwith.
      Returns:
      an XML string representation of this object