|
||||||||||
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 OperationExecutor
public OperationRunner[] getGenericOperationRunners()
OperationExecutor
getGenericOperationRunners
in interface OperationExecutor
public boolean isAllowedToRunInCurrentThread(Operation op)
OperationExecutor
isAllowedToRunInCurrentThread
in interface OperationExecutor
op
- the Operation to check
public boolean isOperationThread()
OperationExecutor
isOperationThread
in interface OperationExecutor
public boolean isInvocationAllowedFromCurrentThread(Operation op, boolean isAsync)
OperationExecutor
isInvocationAllowedFromCurrentThread
in interface OperationExecutor
op
- 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 OperationExecutor
public int getOperationExecutorQueueSize()
getOperationExecutorQueueSize
in interface OperationExecutor
public int getPriorityOperationExecutorQueueSize()
getPriorityOperationExecutorQueueSize
in interface OperationExecutor
public int getResponseQueueSize()
getResponseQueueSize
in interface OperationExecutor
public int getPartitionOperationThreadCount()
getPartitionOperationThreadCount
in interface OperationExecutor
public int getGenericOperationThreadCount()
getGenericOperationThreadCount
in interface OperationExecutor
public void execute(Operation op)
OperationExecutor
execute
in interface OperationExecutor
op
- the operation to execute.public void execute(PartitionSpecificRunnable task)
OperationExecutor
execute
in interface OperationExecutor
task
- the task the execute.public void runOnCallingThreadIfPossible(Operation op)
OperationExecutor
runOnCallingThreadIfPossible
in interface OperationExecutor
op
- the operation to run.public void execute(Packet packet)
OperationExecutor
execute
in interface OperationExecutor
packet
- the packet to execute.public void runOnCallingThread(Operation operation)
OperationExecutor
runOnCallingThread
in interface OperationExecutor
operation
- the operation to run.public OperationRunner getCurrentThreadOperationRunner()
public void shutdown()
OperationExecutor
shutdown
in interface OperationExecutor
public void dumpPerformanceMetrics(StringBuffer sb)
dumpPerformanceMetrics
in interface OperationExecutor
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |