public final class TaskIdImpl extends Object implements TaskId
ITERATION_SEPARATOR, REPLICATION_SEPARATOR
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TaskId that) |
static TaskId |
createTaskId(JobId jobId,
String readableName,
long taskId)
Create task id, and set task name.
|
static TaskId |
createTaskId(JobId jobId,
String readableName,
long taskId,
String tag)
Create task id, and set task name + tag.
|
boolean |
equals(Object o) |
int |
getIterationIndex()
When Control Flow actions are performed on Tasks, some tasks are replicated.
|
JobId |
getJobId()
Returns the job identifier associated with this task.
|
String |
getReadableName()
Return the human readable name associated to this id.
|
int |
getReplicationIndex()
When Control Flow actions are performed on Tasks, some tasks are replicated.
|
String |
getTag()
Return the tag of the task.
|
int |
hashCode() |
long |
longValue()
Returns a long representation that is unique for the job
it is related to.
|
static TaskId |
makeTaskId(String str)
Make a new TaskId with the given arguments.
|
void |
setJobId(JobId jobId) |
void |
setReadableName(String readableName)
Set readable name of this TaskId.
|
void |
setTag(String tag) |
String |
toString()
Returns a String representation that is unique for
the scheduler instance it was built for.
|
String |
value()
Returns a String representation that is unique for the job
it is related to.
|
public static TaskId createTaskId(JobId jobId, String readableName, long taskId)
jobId
- the id of the enclosing job.readableName
- the human readable name of the task.taskId
- the task identifier value.public static TaskId createTaskId(JobId jobId, String readableName, long taskId, String tag)
jobId
- the id of the enclosing job.readableName
- the human readable name of the task.taskId
- the task identifier value.tag
- the tag of the task.public JobId getJobId()
public void setJobId(JobId jobId)
public void setTag(String tag)
public String getReadableName()
getReadableName
in interface TaskId
public void setReadableName(String readableName)
readableName
- the new human readable name.public int compareTo(TaskId that)
compareTo
in interface Comparable<TaskId>
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String value()
TaskId.toString()
for a String
representation unique for the scheduler instance it was built for.public long longValue()
public int getIterationIndex()
TaskId
FlowActionType.IF
action
is differentiated from the original by an incremented Iteration Index.
This index is reflected in the readable name of the Task's id (TaskId.getReadableName()
),
this methods safely extracts it and returns it as an int.getIterationIndex
in interface TaskId
>= 0
)TaskId.getIterationIndex()
public int getReplicationIndex()
TaskId
FlowActionType.REPLICATE
action
is differentiated from the original by an incremented Replication Index.
This index is reflected in the readable name of the Task's id (TaskId.getReadableName()
),
this methods safely extracts it and returns it as an int.getReplicationIndex
in interface TaskId
>= 0
)TaskId.getReplicationIndex()
public String toString()