public abstract class AbstractParallelOperation extends java.lang.Object implements IParallelOperation
| Modifier and Type | Field and Description |
|---|---|
protected Communicator |
channel |
protected Config |
config |
protected java.lang.String |
inEdge |
protected LogicalPlan |
logicalPlan |
protected java.util.Map<java.lang.Integer,java.util.concurrent.BlockingQueue<IMessage>> |
outMessages |
protected java.util.Map<java.lang.Integer,ISync> |
syncs |
| Constructor and Description |
|---|
AbstractParallelOperation(Config config,
Communicator network,
LogicalPlan tPlan,
java.lang.String edge) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the parallel operation
|
void |
finish(int source)
Indicate the end of the operation
|
boolean |
isComplete()
Check weather the operation is complete
|
boolean |
progress()
Progress the parallel operation
|
void |
register(int targetTask,
java.util.concurrent.BlockingQueue<IMessage> queue)
Register a queue for receiving message
|
void |
registerSync(int targetTask,
ISync sink)
Register a callback to notify when a sync happens
|
void |
reset()
Refresh the operation to start from beginning
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOp, send, sendBarrierprotected Config config
protected Communicator channel
protected java.util.Map<java.lang.Integer,java.util.concurrent.BlockingQueue<IMessage>> outMessages
protected java.util.Map<java.lang.Integer,ISync> syncs
protected LogicalPlan logicalPlan
protected java.lang.String inEdge
public AbstractParallelOperation(Config config, Communicator network, LogicalPlan tPlan, java.lang.String edge)
public void registerSync(int targetTask,
ISync sink)
IParallelOperationregisterSync in interface IParallelOperationtargetTask - the targetsink - syncpublic void register(int targetTask,
java.util.concurrent.BlockingQueue<IMessage> queue)
IParallelOperationregister in interface IParallelOperationpublic void close()
IParallelOperationclose in interface IParallelOperationpublic void reset()
IParallelOperationreset in interface IParallelOperationpublic boolean isComplete()
IParallelOperationisComplete in interface IParallelOperationpublic void finish(int source)
IParallelOperationfinish in interface IParallelOperationsource - the sourcepublic boolean progress()
IParallelOperationprogress in interface IParallelOperation