public interface IControllable
Modifier and Type | Method and Description |
---|---|
void |
drain()
Drain this IControllable's workload.
|
boolean |
isPaused()
Is it paused?
|
boolean |
isRunning()
Is this controllable object current active?
|
void |
pause()
Suspend processing.
|
void |
resume()
Resume processing.
|
void |
shutdown()
Stop processing.
|
void pause()
Suspends processing by this IControllable.
ControllableException
- if the controllable is in a bad state
or has been shut downboolean isPaused()
true
if paused; false
otherwiseControllableException
- if the controllable is in a bad state
or has been shut downvoid resume()
ControllableException
- if the controllable is in a bad state
or has been shut downvoid shutdown()
void drain()
To drain an IControllable is to keep it from accepting new work to do but continuing to process existing work.
drain() is similar to pause() in that work eventually stops, but they differ in that pause() stops executing immediately (after the current action completes) and drain() continues until it is done with all work (or data) assigned to it.
For example:
After an IControllable has been drained, it would probably be shutdown, but it could be resumed.
IControllable.pause()
boolean isRunning()
© Copyright IBM Corp. 2013. All rights reserved.