public final class TaskContext extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TaskContext.MetaInfo
Task meta data.
|
| 构造器和说明 |
|---|
TaskContext(String jobName,
List<Integer> shardingItem,
ExecutionType type) |
TaskContext(String jobName,
List<Integer> shardingItem,
ExecutionType type,
String slaveId) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 © 2020 The Apache Software Foundation. All rights reserved.