|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.spi.impl.operationexecutor.classic.ClassicOperationExecutor
public final class ClassicOperationExecutor
A OperationExecutor that schedules:
execute(Object, int, boolean) accepts an Object instead of a runnable to prevent needing to
create wrapper runnables around tasks. This is done to reduce the amount of object litter and therefor
reduce pressure on the gc.
There are 2 category of operation threads:
| Field Summary | |
|---|---|
static int |
TERMINATION_TIMEOUT_SECONDS
|
| Constructor Summary | |
|---|---|
ClassicOperationExecutor(GroupProperties properties,
LoggingService loggerService,
Address thisAddress,
OperationRunnerFactory operationRunnerFactory,
ResponsePacketHandler responsePacketHandler,
HazelcastThreadGroup hazelcastThreadGroup,
NodeExtension nodeExtension)
|
|
| Method Summary | |
|---|---|
void |
dumpPerformanceMetrics(StringBuffer sb)
|
void |
execute(Operation op)
Executes an Operation. |
void |
execute(Packet packet)
Executes a Operation/Response-packet. |
void |
execute(PartitionSpecificRunnable task)
Executes a PartitionSpecificRunnable. |
OperationRunner |
getCurrentThreadOperationRunner()
|
OperationRunner[] |
getGenericOperationRunners()
Gets all the generic operation handlers. |
int |
getGenericOperationThreadCount()
|
int |
getOperationExecutorQueueSize()
|
OperationRunner[] |
getPartitionOperationRunners()
Gets all the operation handlers for the partitions. |
int |
getPartitionOperationThreadCount()
|
int |
getPriorityOperationExecutorQueueSize()
|
int |
getResponseQueueSize()
|
int |
getRunningOperationCount()
|
boolean |
isAllowedToRunInCurrentThread(Operation op)
Checks if the operation is allowed to run on the current thread. |
boolean |
isInvocationAllowedFromCurrentThread(Operation op,
boolean isAsync)
Checks this operation can be invoked from the current thread. |
boolean |
isOperationThread()
Checks if the current thread is an operation thread. |
void |
runOnCallingThread(Operation operation)
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. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TERMINATION_TIMEOUT_SECONDS
| Constructor Detail |
|---|
public ClassicOperationExecutor(GroupProperties properties,
LoggingService loggerService,
Address thisAddress,
OperationRunnerFactory operationRunnerFactory,
ResponsePacketHandler responsePacketHandler,
HazelcastThreadGroup hazelcastThreadGroup,
NodeExtension nodeExtension)
| Method Detail |
|---|
public OperationRunner[] getPartitionOperationRunners()
OperationExecutor
getPartitionOperationRunners in interface OperationExecutorpublic OperationRunner[] getGenericOperationRunners()
OperationExecutor
getGenericOperationRunners in interface OperationExecutorpublic boolean isAllowedToRunInCurrentThread(Operation op)
OperationExecutor
isAllowedToRunInCurrentThread in interface OperationExecutorop - the Operation to check
public boolean isOperationThread()
OperationExecutor
isOperationThread in interface OperationExecutor
public boolean isInvocationAllowedFromCurrentThread(Operation op,
boolean isAsync)
OperationExecutor
isInvocationAllowedFromCurrentThread in interface OperationExecutorop - the Operation to checkisAsync - is the invocation async, if false invocation does not return a future to block on
public int getRunningOperationCount()
getRunningOperationCount in interface OperationExecutorpublic int getOperationExecutorQueueSize()
getOperationExecutorQueueSize in interface OperationExecutorpublic int getPriorityOperationExecutorQueueSize()
getPriorityOperationExecutorQueueSize in interface OperationExecutorpublic int getResponseQueueSize()
getResponseQueueSize in interface OperationExecutorpublic int getPartitionOperationThreadCount()
getPartitionOperationThreadCount in interface OperationExecutorpublic int getGenericOperationThreadCount()
getGenericOperationThreadCount in interface OperationExecutorpublic void execute(Operation op)
OperationExecutor
execute in interface OperationExecutorop - the operation to execute.public void execute(PartitionSpecificRunnable task)
OperationExecutor
execute in interface OperationExecutortask - the task the execute.public void runOnCallingThreadIfPossible(Operation op)
OperationExecutor
runOnCallingThreadIfPossible in interface OperationExecutorop - the operation to run.public void execute(Packet packet)
OperationExecutor
execute in interface OperationExecutorpacket - the packet to execute.public void runOnCallingThread(Operation operation)
OperationExecutor
runOnCallingThread in interface OperationExecutoroperation - the operation to run.public OperationRunner getCurrentThreadOperationRunner()
public void shutdown()
OperationExecutor
shutdown in interface OperationExecutorpublic void dumpPerformanceMetrics(StringBuffer sb)
dumpPerformanceMetrics in interface OperationExecutorpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||