@ThreadSafe public class CommandExitLatch extends Object
Constructor and Description |
---|
CommandExitLatch(CommandFuture... futures)
Constructs a new CommandExitLatch to shutdown an ExecutionSystem
after all registered CommandFutures have finished.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isClosed() |
void |
register(CommandFuture future)
Register a new CommandFuture on the Listener.
|
public CommandExitLatch(CommandFuture... futures)
futures
- CommandFutures to registerpublic boolean isClosed() throws IOException
IOException
- wrapping any exceptions thrown by closing the ExecutionSystem.public void register(CommandFuture future)
future
- the CommandFuture to registerIllegalStateException
- if the Listener has already been started.