com.hazelcast.spi.impl
Class BasicOperationScheduler
java.lang.Object
com.hazelcast.spi.impl.BasicOperationScheduler
public final class BasicOperationScheduler
- extends Object
The BasicOperationProcessor belongs to the BasicOperationService and is responsible for scheduling
operations/packets to the correct threads.
The actual processing of the 'task' that is scheduled, is forwarded to the BasicDispatcher
. So
this class is purely responsible for assigning a 'task' to a particular thread.
The 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:
- partition specific operation threads: these threads are responsible for executing e.g. a map.put.
Operations for the same partition, always end up in the same thread.
-
generic operation threads: these threads are responsible for executing operations that are not
specific to a partition. E.g. a heart beat.
TERMINATION_TIMEOUT_SECONDS
public static final int TERMINATION_TIMEOUT_SECONDS
- See Also:
- Constant Field Values
BasicOperationScheduler
public BasicOperationScheduler(Node node,
ExecutionService executionService,
BasicDispatcher dispatcher)
getOperationExecutorQueueSize
public int getOperationExecutorQueueSize()
getPriorityOperationExecutorQueueSize
public int getPriorityOperationExecutorQueueSize()
getResponseQueueSize
public int getResponseQueueSize()
execute
public void execute(Operation op)
execute
public void execute(Runnable task,
int partitionId)
execute
public void execute(Packet packet)
shutdown
public void shutdown()
toString
public String toString()
- Overrides:
toString
in class Object
dumpPerformanceMetrics
public void dumpPerformanceMetrics(StringBuffer sb)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.