public final class TaskContext extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TaskContext.MetaInfo
Task meta data.
|
| Constructor and Description |
|---|
TaskContext(String jobName,
List<Integer> shardingItem,
ExecutionType type) |
TaskContext(String jobName,
List<Integer> shardingItem,
ExecutionType type,
String slaveId) |
| Modifier and Type | Method and Description |
|---|---|
static TaskContext |
from(String id)
Get task context via task ID.
|
String |
getExecutorId(String appName)
Get executor ID.
|
static String |
getIdForUnassignedSlave(String id)
Get unassigned task ID before job execute.
|
String |
getTaskName()
Get task name.
|
void |
setSlaveId(String slaveId)
Set job server ID.
|
public TaskContext(String jobName, List<Integer> shardingItem, ExecutionType type)
public TaskContext(String jobName, List<Integer> shardingItem, ExecutionType type, String slaveId)
public static TaskContext from(String id)
id - task IDpublic static String getIdForUnassignedSlave(String id)
id - task IDpublic void setSlaveId(String slaveId)
slaveId - job server IDpublic String getTaskName()
Copyright © 2021 The Apache Software Foundation. All rights reserved.