com.twitter.common.application
Class StartupRegistry

java.lang.Object
  extended by com.twitter.common.application.StartupRegistry
All Implemented Interfaces:
ExceptionalCommand<Exception>

public class StartupRegistry
extends Object
implements ExceptionalCommand<Exception>

A registry that executes a set of commands. The registry will synchronously execute commands when execute() is invoked, returning early if any action throws an exception. Only one call to execute() will have an effect, all subsequent calls will be ignored.


Constructor Summary
StartupRegistry(Set<ExceptionalCommand> startupActions)
           
 
Method Summary
 void execute()
          Performs a unit of work, possibly throwing E in the process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartupRegistry

@Inject
public StartupRegistry(Set<ExceptionalCommand> startupActions)
Method Detail

execute

public void execute()
             throws Exception
Description copied from interface: ExceptionalCommand
Performs a unit of work, possibly throwing E in the process.

Specified by:
execute in interface ExceptionalCommand<Exception>
Throws:
Exception