com.hazelcast.spi.impl.operationexecutor.classic
Class OperationThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.hazelcast.util.executor.HazelcastManagedThread
          extended by com.hazelcast.spi.impl.operationexecutor.classic.OperationThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
GenericOperationThread, PartitionOperationThread

public abstract class OperationThread
extends HazelcastManagedThread

The OperationThread is responsible for processing operations, packets containing operations and runnable's.

There are 2 flavors of OperationThread: - threads that deal with operations for a specific partition - threads that deal with non partition specific tasks

The actual processing of an operation is forwarded to the OperationRunner.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
OperationThread(String name, int threadId, ScheduleQueue scheduleQueue, ILogger logger, HazelcastThreadGroup threadGroup, NodeExtension nodeExtension)
           
 
Method Summary
 void awaitTermination(int timeout, TimeUnit unit)
           
 OperationRunner getCurrentOperationRunner()
           
abstract  OperationRunner getOperationRunner(int partitionId)
           
 void run()
          Manages the thread lifecycle and can be overridden to customize if needed.
 void shutdown()
           
 
Methods inherited from class com.hazelcast.util.executor.HazelcastManagedThread
afterRun, beforeRun, executeRun, setContextClassLoader
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperationThread

public OperationThread(String name,
                       int threadId,
                       ScheduleQueue scheduleQueue,
                       ILogger logger,
                       HazelcastThreadGroup threadGroup,
                       NodeExtension nodeExtension)
Method Detail

getCurrentOperationRunner

public OperationRunner getCurrentOperationRunner()

getOperationRunner

public abstract OperationRunner getOperationRunner(int partitionId)

run

public final void run()
Description copied from class: HazelcastManagedThread
Manages the thread lifecycle and can be overridden to customize if needed.

Specified by:
run in interface Runnable
Overrides:
run in class HazelcastManagedThread

shutdown

public final void shutdown()

awaitTermination

public final void awaitTermination(int timeout,
                                   TimeUnit unit)
                            throws InterruptedException
Throws:
InterruptedException


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.