Class PolicyContext

java.lang.Object
org.jppf.node.policy.PolicyContext

public class PolicyContext extends Object
Instances of this class provide contextual information to execution policies. It contains information on the job, if any, against which the policy is evaluated, and on the server for server-side policies.
Since:
5.0
Author:
Laurent Cohen
  • Constructor Details

    • PolicyContext

      public PolicyContext(JobSLA sla, JobClientSLA clientSLA, JobMetadata metadata, int jobDispatches, JPPFStatistics stats)
      Initialize this policy context.
      Parameters:
      sla - the job server side SLA, set at runtime by the server.
      clientSLA - the job client side SLA, set at runtime by the server.
      metadata - the job metadata, set at runtime by the server.
      jobDispatches - the number of nodes the job is already dispatched to.
      stats - the server statistics.
  • Method Details

    • getSLA

      public JobSLA getSLA()
      Get the job server side SLA, set at runtime by the server.
      Returns:
      a JobSLA object.
    • getClientSLA

      public JobClientSLA getClientSLA()
      Get the job client side SLA, set at runtime by the server.
      Returns:
      a JobClientSLA object.
    • getMetadata

      public JobMetadata getMetadata()
      Get the job metadata, set at runtime by the server.
      Returns:
      a JobMetadata object.
    • getJobDispatches

      public int getJobDispatches()
      Get the number of nodes the job is already dispatched to.
      Returns:
      the number of nodes as an int.
    • getStats

      public JPPFStatistics getStats()
      Get the server statistics.
      Returns:
      a JPPFStatistics object.