Class TaskInfo

java.lang.Object
  |
  +--TaskInfo

public class TaskInfo
extends java.lang.Object

This structure constains the properties of the task, i.e. if it can be executed on a Producer, if it has been already executed, its Id, and so on.


Field Summary
 boolean isLocal
          If a task is local, it means that it cannot be moved from the node in which it was created.
 boolean isProducerAllowed
          If a task can be executed on a producer this field is set to true, which happens to be the default value.
 boolean isServerAllowed
          If this field is set to true, a task can be executed on a Task Server.
 long jobId
          All the tasks that belong to the same task graph, share the same jobId.
 int numOfExecutions
          It is possible to execute the same task more than once, for correctness purposes.
 int numOfReplicas
          How many times the same task has been replicated.
 long putBy
          The node Id that created/forwarded the task the last time.
 Sequence taskId
          Each task has a unique Task Id, or sequence number, that gives its position in the task graph.
 java.lang.String taskOriginator
          The RMI registry of the node that originally submitted the task.
 int taskOriginatorType
          What kind of type (i.e.
 int taskType
          The task can be one of the following types: Ready to go, when all input arguments are present Waiting, when some input arguments are missing, and therefore the task cannot be executed New task, for new tasks Completed task, for task that have been already computed.
 
Constructor Summary
TaskInfo(long jobId, Sequence taskId, Sequence tcroot, int numOfReplicas, int numOfExecutions, long putBy, java.lang.String taskOriginator, int taskOriginatorType, boolean isProducerAllowed, boolean isServerAllowed)
          Use this constructor when you want to create a new object.
TaskInfo(TaskInfo copyTaskInfo)
          Use this constructor when you want to replicated an exisitng TaskInfo object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isLocal

public boolean isLocal
If a task is local, it means that it cannot be moved from the node in which it was created. All the waiting tasks. i.e. tasks that are waiting for input arguments, are usually local.

isProducerAllowed

public boolean isProducerAllowed
If a task can be executed on a producer this field is set to true, which happens to be the default value.

isServerAllowed

public boolean isServerAllowed
If this field is set to true, a task can be executed on a Task Server. Default value is false.

jobId

public long jobId
All the tasks that belong to the same task graph, share the same jobId. When the consumer submits a new task, it should set this field to -1, indicating a new task. The actual value will be set by the system.

numOfExecutions

public int numOfExecutions
It is possible to execute the same task more than once, for correctness purposes. In the normal case, numOfExecutions<=1.

numOfReplicas

public int numOfReplicas
How many times the same task has been replicated. The replication can be done for performance and/or fault tolerance reasons.

putBy

public long putBy
The node Id that created/forwarded the task the last time. Currently not used.

taskId

public Sequence taskId
Each task has a unique Task Id, or sequence number, that gives its position in the task graph. It is defined in such a way, that even if it is created multiple times (probably in different nodes), still it will have the same Id.

taskOriginator

public java.lang.String taskOriginator
The RMI registry of the node that originally submitted the task. We use this field in order to know where to return the results.

taskOriginatorType

public int taskOriginatorType
What kind of type (i.e. Producer,Consumer,Task Server) is the node that submitted the task. @see NodeInfo

taskType

public int taskType
The task can be one of the following types: Ready to go, when all input arguments are present Waiting, when some input arguments are missing, and therefore the task cannot be executed New task, for new tasks Completed task, for task that have been already computed. Check out CXConst.java file for specific values.
Constructor Detail

TaskInfo

public TaskInfo(long jobId,
                Sequence taskId,
                Sequence tcroot,
                int numOfReplicas,
                int numOfExecutions,
                long putBy,
                java.lang.String taskOriginator,
                int taskOriginatorType,
                boolean isProducerAllowed,
                boolean isServerAllowed)
Use this constructor when you want to create a new object.

TaskInfo

public TaskInfo(TaskInfo copyTaskInfo)
Use this constructor when you want to replicated an exisitng TaskInfo object.