com.hazelcast.util.executor
Class HazelcastManagedThread
java.lang.Object
java.lang.Thread
com.hazelcast.util.executor.HazelcastManagedThread
- All Implemented Interfaces:
- Runnable
public class HazelcastManagedThread
- extends Thread
Base class for all Hazelcast threads to manage them from a single point.
Concrete classes can customize their behaviours by overriding
beforeRun()
,
executeRun()
and
afterRun()
methods.
Method Summary |
protected void |
afterRun()
Called after inner run method and can be overridden to customize. |
protected void |
beforeRun()
Called before inner run method and can be overridden to customize. |
protected void |
executeRun()
Does the actual run and can be overridden to customize. |
void |
run()
Manages the thread lifecycle and can be overridden to customize if needed. |
void |
setContextClassLoader(ClassLoader cl)
|
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 |
HazelcastManagedThread
public HazelcastManagedThread()
HazelcastManagedThread
public HazelcastManagedThread(Runnable target)
HazelcastManagedThread
public HazelcastManagedThread(ThreadGroup group,
Runnable target)
HazelcastManagedThread
public HazelcastManagedThread(String name)
HazelcastManagedThread
public HazelcastManagedThread(ThreadGroup group,
String name)
HazelcastManagedThread
public HazelcastManagedThread(Runnable target,
String name)
HazelcastManagedThread
public HazelcastManagedThread(ThreadGroup group,
Runnable target,
String name)
setContextClassLoader
public void setContextClassLoader(ClassLoader cl)
- Overrides:
setContextClassLoader
in class Thread
beforeRun
protected void beforeRun()
- Called before inner run method and can be overridden to customize.
executeRun
protected void executeRun()
- Does the actual run and can be overridden to customize.
afterRun
protected void afterRun()
- Called after inner run method and can be overridden to customize.
run
public void run()
- Manages the thread lifecycle and can be overridden to customize if needed.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.