Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
OperatorThread(String name,
Runnable operatorRunnable,
boolean shouldInterrupt,
boolean synchronizedShutdown)
Constructor
|
Modifier and Type | Method and Description |
---|---|
(package private) int |
getNextState()
Get next state
|
(package private) void |
postStateChange(int state)
Request that the operator thread switch into a new state.
|
void |
run()
Run method of this operator thread.
|
(package private) boolean |
shouldInterrupt()
Get should interrupt?
|
boolean |
shouldRun()
Implement state request responses of this operator thread.
|
(package private) void |
shutdown()
Explicitly set the state of the thread to shutdown.
|
(package private) void |
waitForAcceptance()
Block until the operator thread has successfully switched into the
new state requested by postStateChange.
|
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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public void run()
boolean shouldInterrupt()
public boolean shouldRun()
int getNextState()
void postStateChange(int state)
Operator.OperatorThread.waitForAcceptance()
must be called before another
state change can be posted.
This method must be called from the main thread.
state
- New statevoid waitForAcceptance() throws StreamBaseException
This must be must be called from the main thread.
StreamBaseException
- If timed out.void shutdown()
Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.