org.jppf.server.protocol
Class JPPFJobSLA

java.lang.Object
  extended by org.jppf.server.protocol.JPPFJobSLA
All Implemented Interfaces:
Serializable

public class JPPFJobSLA
extends Object
implements Serializable

This class represents the Service Level Agreement Between a JPPF job and a server. It determines the state, conditions and order in which a job will be executed.

Author:
Laurent Cohen
See Also:
Serialized Form

Constructor Summary
JPPFJobSLA()
          Default constructor.
JPPFJobSLA(ExecutionPolicy policy)
          Initialize this job SLA with the specified execution policy.
JPPFJobSLA(ExecutionPolicy policy, int priority)
          Initialize this job SLA with the specified execution policy and priority.
JPPFJobSLA(ExecutionPolicy policy, int priority, int maxNodes, boolean suspended)
          Initialize this job SLA with the specified execution policy, priority, max number of nodes and suspended indicator.
 
Method Summary
 JPPFJobSLA copy()
          Create a copy of this job SLA.
 ExecutionPolicy getExecutionPolicy()
          Get the tasks execution policy.
 JPPFSchedule getJobExpirationSchedule()
          Get the job expiration schedule configuration.
 JPPFSchedule getJobSchedule()
          Get the job schedule.
 int getMaxNodes()
          Get the maximum number of nodes this job can run on.
 int getPriority()
          Get the priority of this job.
 boolean isBroadcastJob()
          Determine whether the job is a broadcast job.
 boolean isSuspended()
          Determine whether this job is initially suspended.
 void setBroadcastJob(boolean broadcastJob)
          Specify whether the job is a broadcast job.
 void setExecutionPolicy(ExecutionPolicy executionPolicy)
          Set the tasks execution policy.
 void setJobExpirationSchedule(JPPFSchedule jobExpirationSchedule)
          Set the job expiration schedule configuration.
 void setJobSchedule(JPPFSchedule jobSchedule)
          Set the job schedule.
 void setMaxNodes(int maxNodes)
          Set the maximum number of nodes this job can run on.
 void setPriority(int priority)
          Set the priority of this job.
 void setSuspended(boolean suspended)
          Specify whether this job is initially suspended.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPPFJobSLA

public JPPFJobSLA()
Default constructor.


JPPFJobSLA

public JPPFJobSLA(ExecutionPolicy policy)
Initialize this job SLA with the specified execution policy.

Parameters:
policy - the tasks execution policy.

JPPFJobSLA

public JPPFJobSLA(ExecutionPolicy policy,
                  int priority)
Initialize this job SLA with the specified execution policy and priority.

Parameters:
policy - the tasks execution policy.
priority - the priority of this job.

JPPFJobSLA

public JPPFJobSLA(ExecutionPolicy policy,
                  int priority,
                  int maxNodes,
                  boolean suspended)
Initialize this job SLA with the specified execution policy, priority, max number of nodes and suspended indicator.

Parameters:
policy - the tasks execution policy.
priority - the priority of this job.
maxNodes - the maximum number of nodes this job can run on. A value <= 0 means no limit on the number of nodes.
suspended - determines whether this job is initially suspended.
Method Detail

getExecutionPolicy

public ExecutionPolicy getExecutionPolicy()
Get the tasks execution policy.

Returns:
an ExecutionPolicy instance.

setExecutionPolicy

public void setExecutionPolicy(ExecutionPolicy executionPolicy)
Set the tasks execution policy.

Parameters:
executionPolicy - an ExecutionPolicy instance.

getPriority

public int getPriority()
Get the priority of this job.

Returns:
the priority as an int.

setPriority

public void setPriority(int priority)
Set the priority of this job.

Parameters:
priority - the priority as an int.

getMaxNodes

public int getMaxNodes()
Get the maximum number of nodes this job can run on.

Returns:
the number of nodes as an int value.

setMaxNodes

public void setMaxNodes(int maxNodes)
Set the maximum number of nodes this job can run on.

Parameters:
maxNodes - the number of nodes as an int value. A value <= 0 means no limit on the number of nodes.

isSuspended

public boolean isSuspended()
Determine whether this job is initially suspended.

Returns:
true if the job is suspended, false otherwise.

setSuspended

public void setSuspended(boolean suspended)
Specify whether this job is initially suspended.

Parameters:
suspended - true if the job is suspended, false otherwise.

getJobSchedule

public JPPFSchedule getJobSchedule()
Get the job schedule.

Returns:
a JPPFSchedule instance.

setJobSchedule

public void setJobSchedule(JPPFSchedule jobSchedule)
Set the job schedule.

Parameters:
jobSchedule - a JPPFSchedule instance.

getJobExpirationSchedule

public JPPFSchedule getJobExpirationSchedule()
Get the job expiration schedule configuration.

Returns:
a JPPFSchedule instance.

setJobExpirationSchedule

public void setJobExpirationSchedule(JPPFSchedule jobExpirationSchedule)
Set the job expiration schedule configuration.

Parameters:
jobExpirationSchedule - a JPPFSchedule instance.

isBroadcastJob

public boolean isBroadcastJob()
Determine whether the job is a broadcast job.

Returns:
true for a broadcast job, false otherwise.

setBroadcastJob

public void setBroadcastJob(boolean broadcastJob)
Specify whether the job is a broadcast job.

Parameters:
broadcastJob - true for a broadcast job, false otherwise.

copy

public JPPFJobSLA copy()
Create a copy of this job SLA.

Returns:
a JPPFJobSLA instance.


Copyright © 2005-2010 JPPF Team.