public class TaskBatchInstance extends java.lang.Object implements INodeInstance, ISync
Constructor and Description |
---|
TaskBatchInstance(ICompute task,
java.util.concurrent.BlockingQueue<IMessage> inQueue,
java.util.concurrent.BlockingQueue<IMessage> outQueue,
Config config,
java.lang.String tName,
int taskId,
int globalTaskId,
int tIndex,
int parallel,
int wId,
java.util.Map<java.lang.String,java.lang.Object> cfgs,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> inEdges,
java.util.Map<java.lang.String,java.lang.String> outEdges,
TaskSchedulePlan taskSchedule,
CheckpointingClient checkpointingClient,
java.lang.String taskGraphName,
long tasksVersion) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Calls at the end to clean up
|
boolean |
execute()
Execute
|
int |
getId()
Get task id
|
int |
getIndex() |
java.util.concurrent.BlockingQueue<IMessage> |
getInQueue() |
INode |
getNode()
Get the node of this instance
|
boolean |
isComplete()
Progress the communication
|
void |
prepare(Config cfg)
Prepare for an execution
|
void |
registerInParallelOperation(java.lang.String edge,
IParallelOperation op) |
void |
registerOutParallelOperation(java.lang.String edge,
IParallelOperation op) |
void |
reset()
Lets reset the node instance for a new execution
|
boolean |
sync(java.lang.String edge,
byte[] value)
Callback for sync
|
public TaskBatchInstance(ICompute task, java.util.concurrent.BlockingQueue<IMessage> inQueue, java.util.concurrent.BlockingQueue<IMessage> outQueue, Config config, java.lang.String tName, int taskId, int globalTaskId, int tIndex, int parallel, int wId, java.util.Map<java.lang.String,java.lang.Object> cfgs, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> inEdges, java.util.Map<java.lang.String,java.lang.String> outEdges, TaskSchedulePlan taskSchedule, CheckpointingClient checkpointingClient, java.lang.String taskGraphName, long tasksVersion)
public void prepare(Config cfg)
INodeInstance
prepare
in interface INodeInstance
cfg
- configurationpublic void registerOutParallelOperation(java.lang.String edge, IParallelOperation op)
public void registerInParallelOperation(java.lang.String edge, IParallelOperation op)
public boolean execute()
INodeInstance
execute
in interface INodeInstance
public boolean sync(java.lang.String edge, byte[] value)
ISync
public boolean isComplete()
INodeInstance
isComplete
in interface INodeInstance
public int getId()
INodeInstance
getId
in interface INodeInstance
public int getIndex()
getIndex
in interface INodeInstance
public INode getNode()
INodeInstance
getNode
in interface INodeInstance
public void close()
INodeInstance
close
in interface INodeInstance
public void reset()
INodeInstance
reset
in interface INodeInstance
public java.util.concurrent.BlockingQueue<IMessage> getInQueue()