org.jppf.job
Class JobInformation

java.lang.Object
  extended by org.jppf.job.JobInformation
All Implemented Interfaces:
Serializable

public class JobInformation
extends Object
implements Serializable

Instances of this class group tasks from the same client together, so they are sent to the same node, avoiding unnecessary transport overhead.
The goal is to provide a performance enhancement through an adaptive bundling of tasks originating from the same client. The bundle size is computed dynamically, depending on the number of nodes connected to the server, and other factors.

Author:
Laurent Cohen
See Also:
Serialized Form

Constructor Summary
JobInformation()
          Initialize this object.
JobInformation(String jobUuid, String jobId, int taskCount, int initialTaskCount, int priority, boolean suspended, boolean pending)
          Initialize this object with the specified parameters.
 
Method Summary
 int getInitialTaskCount()
          Get the initial task count of this bundle.
 String getJobId()
          Get the user-defined identifier for the job.
 String getJobUuid()
          Get the unique identifier for the job.
 int getMaxNodes()
          Get the maximum number of nodes this job can run on.
 int getPriority()
          Get the priority of the job.
 int getTaskCount()
          Get the current number of tasks in the job.
 boolean isPending()
          Get the pending state of the job.
 boolean isSuspended()
          Determine whether the job is in suspended state.
 void setInitialTaskCount(int initialTaskCount)
          Set the initial task count of the job.
 void setJobId(String id)
          Set the user-defined identifier for the job.
 void setJobUuid(String jobUuid)
          Set the unique identifier for the job.
 void setMaxNodes(int maxNodes)
          Get the maximum number of nodes this job can run on.
 void setPending(boolean pending)
          Set the pending state of the job.
 void setPriority(int priority)
          Set the priority of the job.
 void setSuspended(boolean suspended)
          Specify whether the job is in suspended state.
 void setTaskCount(int taskCount)
          Set the current number of tasks in the job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobInformation

public JobInformation()
Initialize this object.


JobInformation

public JobInformation(String jobUuid,
                      String jobId,
                      int taskCount,
                      int initialTaskCount,
                      int priority,
                      boolean suspended,
                      boolean pending)
Initialize this object with the specified parameters.

Parameters:
jobUuid - the universal unique id of this job.
jobId - the user-defined id of this job.
taskCount - tne number of tasks in thsi job.
initialTaskCount - the initial number of tasks in the job submitted by the JPPF client.
priority - the priority of this job.
suspended - determines whether the job is in suspended state.
pending - determines whether the job is waiting to reach its scheduled execution date.
Method Detail

getJobId

public String getJobId()
Get the user-defined identifier for the job.

Returns:
the id as a string.

setJobId

public void setJobId(String id)
Set the user-defined identifier for the job.

Parameters:
id - the id as a string.

getTaskCount

public int getTaskCount()
Get the current number of tasks in the job.

Returns:
the number of tasks as an int.

setTaskCount

public void setTaskCount(int taskCount)
Set the current number of tasks in the job.

Parameters:
taskCount - the number of tasks as an int.

getPriority

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

Returns:
the priority as an int.

setPriority

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

Parameters:
priority - the priority as an int.

getInitialTaskCount

public int getInitialTaskCount()
Get the initial task count of this bundle.

Returns:
the task count as an int.

setInitialTaskCount

public void setInitialTaskCount(int initialTaskCount)
Set the initial task count of the job.

Parameters:
initialTaskCount - the task count as an int.

isSuspended

public boolean isSuspended()
Determine whether the job is in suspended state.

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

setSuspended

public void setSuspended(boolean suspended)
Specify whether the job is in suspended state.

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

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)
Get the maximum number of nodes this job can run on.

Parameters:
maxNodes - the number of nodes as an int value.

isPending

public boolean isPending()
Get the pending state of the job. A job is pending if its scheduled execution date/time has not yet been reached.

Returns:
determines whether the job is waiting to reach its scheduled execution date.

setPending

public void setPending(boolean pending)
Set the pending state of the job.

Parameters:
pending - specifies whether the job is waiting to reach its scheduled execution date.

getJobUuid

public String getJobUuid()
Get the unique identifier for the job.

Returns:
the uuid as a string.

setJobUuid

public void setJobUuid(String jobUuid)
Set the unique identifier for the job.

Parameters:
jobUuid - the uuid as a string.


Copyright © 2005-2010 JPPF Team.