public class Task extends Object implements Serializable
      A Task maintains information about the work the Worker is responsible for. This class is extendable and
      therefore can maintain more information for more complex tasks. At its core, each Task maintains at least the following
      
| Modifier and Type | Field and Description | 
|---|---|
| int | affinityLevel | 
| long | initTime | 
| String | nodeId | 
| String | phase | 
| int | retryCount | 
| long | scheduleTime | 
| int | status | 
| String | targetLocation | 
| String | taskId | 
| TransactionInfo | txnInfo | 
| Constructor and Description | 
|---|
| Task() | 
| Task(String id) | 
| Task(String id,
    TransactionInfo txnInfo) | 
| Task(String id,
    TransactionInfo txnInfo,
    int affinityLevel,
    String location) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| String | getNodeId() | 
| TransactionInfo | getTxnInfo() | 
| void | setAffinityLevel(int affinityLevel,
                String location) | 
| void | setPhase(String phase) | 
| void | setStatus(int status) | 
| String | toString() | 
public String taskId
public String nodeId
public TransactionInfo txnInfo
public String phase
public int affinityLevel
public String targetLocation
public int status
public int retryCount
public long initTime
public long scheduleTime
public Task()
public Task(String id)
id - The unique identifier for this taskpublic Task(String id, TransactionInfo txnInfo)
id - The unique identifier for this tasktxnInfo - The TransactionInfo associated with this taskpublic Task(String id, TransactionInfo txnInfo, int affinityLevel, String location)
id - The unique identifier for this tasktxnInfo - The TransactionInfo associated with this taskaffinityLevel - How strongly this task should be deposited to location with
                      location - The url of the server where this task should ideally be depositedpublic void setPhase(String phase)
phase - Can be one of the following:
              public String getNodeId()
public TransactionInfo getTxnInfo()
public void setStatus(int status)
status - TaskConstantspublic void setAffinityLevel(int affinityLevel,
                             String location)
affinityLevel - How strongly this task should be deposited to location with
                      location - The url of the server where this task should ideally be deposited.