com.twitter.common.application
Interface ShutdownRegistry

All Known Implementing Classes:
ShutdownRegistry.ShutdownRegistryImpl, TearDownRegistry

public interface ShutdownRegistry

A shutdown action controller. It executes actions in the reverse order they were registered, and logs a warning for every shutdown action that fails, but doesn't prevent completion of subsequent actions or the normal completion of the execute() method.


Nested Class Summary
static class ShutdownRegistry.ShutdownRegistryImpl
          Implementation of a shutdown registry.
 
Method Summary
<E extends Exception,T extends ExceptionalCommand<E>>
void
addAction(T action)
          Adds an action to the shutdown registry.
 

Method Detail

addAction

<E extends Exception,T extends ExceptionalCommand<E>> void addAction(T action)
Adds an action to the shutdown registry.

Type Parameters:
E - Exception type thrown by the action.
T - Type of command.
Parameters:
action - Action to register.