|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OperationExecutor
The OperationExecutor is responsible for scheduling work (packets/operations) to be executed. It can be compared
to a Executor
with the big difference that it is designed for assigning packets,
operations and PartitionSpecificRunnable to a thread instead of only runnables.
It depends on the implementation if an operation is executed on the calling thread or not. For example the
ClassicOperationExecutor
will always offload a partition specific
Operation to the correct partition-operation-thread.
The actual processing of a operation-packet, Operation, or a PartitionSpecificRunnable is forwarded to the
OperationRunner
.
In case of a response packet, the ResponsePacketHandler
is used to handle the response.
Method Summary | |
---|---|
void |
dumpPerformanceMetrics(StringBuffer sb)
Deprecated. |
void |
execute(Operation op)
Executes an Operation. |
void |
execute(Packet packet)
Executes a Operation/Response-packet. |
void |
execute(PartitionSpecificRunnable task)
Executes a PartitionSpecificRunnable. |
OperationRunner[] |
getGenericOperationRunners()
Gets all the generic operation handlers. |
int |
getGenericOperationThreadCount()
Deprecated. |
int |
getOperationExecutorQueueSize()
Deprecated. |
OperationRunner[] |
getPartitionOperationRunners()
Gets all the operation handlers for the partitions. |
int |
getPartitionOperationThreadCount()
Deprecated. |
int |
getPriorityOperationExecutorQueueSize()
Deprecated. |
int |
getResponseQueueSize()
Deprecated. |
int |
getRunningOperationCount()
Deprecated. |
boolean |
isAllowedToRunInCurrentThread(Operation op)
Deprecated. |
boolean |
isInvocationAllowedFromCurrentThread(Operation op,
boolean isAsync)
Checks this operation can be invoked from the current thread. |
boolean |
isOperationThread()
Deprecated. it should not matter if a thread is an operation thread or not; this is something operationExecutor specific. |
void |
runOnCallingThread(Operation op)
Runs the operation on the calling thread. |
void |
runOnCallingThreadIfPossible(Operation op)
Tries to run the operation on the calling thread if possible. |
void |
shutdown()
Shuts down this OperationExecutor. |
Method Detail |
---|
@Deprecated int getRunningOperationCount()
@Deprecated int getOperationExecutorQueueSize()
@Deprecated int getPriorityOperationExecutorQueueSize()
@Deprecated int getResponseQueueSize()
@Deprecated int getPartitionOperationThreadCount()
@Deprecated int getGenericOperationThreadCount()
@Deprecated void dumpPerformanceMetrics(StringBuffer sb)
OperationRunner[] getPartitionOperationRunners()
OperationRunner[] getGenericOperationRunners()
void execute(Operation op)
op
- the operation to execute.
NullPointerException
- if op is null.void execute(PartitionSpecificRunnable task)
task
- the task the execute.
NullPointerException
- if task is null.void execute(Packet packet)
packet
- the packet to execute.
NullPointerException
- if packet is nullvoid runOnCallingThread(Operation op)
op
- the operation to run.
NullPointerException
- if op is null.
IllegalThreadStateException
- if the operation is not allowed to be run on the calling thread.void runOnCallingThreadIfPossible(Operation op)
op
- the operation to run.
NullPointerException
- if op is null.@Deprecated boolean isAllowedToRunInCurrentThread(Operation op)
op
- the Operation to check
NullPointerException
- if op is null.boolean isOperationThread()
boolean isInvocationAllowedFromCurrentThread(Operation op, boolean isAsync)
op
- the Operation to checkisAsync
- is the invocation async, if false invocation does not return a future to block on
void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |