org.d_haven.event.command
public abstract class AbstractThreadPolicy extends Object implements ThreadPolicy, Runnable
Field Summary | |
---|---|
ThreadManager | m_manager |
boolean | m_running |
Method Summary | |
---|---|
protected void | endLoop()
Provide a hook to do further cleanup when we end the management
loop.
|
void | executeLoop(ThreadManager manager)
Take care of the standard checks that need to be in place, and
then delegate to the AbstractThreadPolicy method to do any further
initialization.
|
boolean | isRunning()
Returns whether this ThreadPolicy is currently running or not.
|
protected abstract void | process(Collection pipelines)
Do the actual management logic that needs to be done in each time
through the main loop.
|
void | run()
Do the actual looping code. |
protected abstract void | startLoop()
Provide a hook to do further initialization when we start the
management loop. |
void | terminateLoop()
Stops the loop and calls the AbstractThreadPolicy method to do any
further tear down.
|
Throws: InterruptedException if the calling thread is interrupted
Parameters: manager the ThreadManager to run the pipelines through
Throws: InterruptedException if the calling thread is interrupted
Returns: true
if the management thread is running
Parameters: pipelines The pipelines to manage
Throws: Exception if there is a problem or the thread is interrupted
Throws: InterruptedException if the calling thread is interrupted
Throws: InterruptedException if the calling thread is interrupted