Example usage for Java com.google.common.util.concurrent ServiceManager fields, constructors, methods, implement or subclass
The text is from its open source code.
ServiceManager(Iterable extends Service> services) Constructs a new instance for managing the given services. |
void | addListener(Listener listener) Registers a Listener to be run when this ServiceManager changes state. |
void | awaitHealthy() Waits for the ServiceManager to become #isHealthy() healthy . |
void | awaitStopped(long timeout, TimeUnit unit) Waits for the all the services to reach a terminal state for no more than the given time. |
ImmutableMultimap | servicesByState() Provides a snapshot of the current state of all the services under management. |
ServiceManager | startAsync() Initiates service Service#startAsync startup on all the services being managed. |
ImmutableMap | startupTimes() Returns the service load times. |
ServiceManager | stopAsync() Initiates service Service#stopAsync shutdown if necessary on all the services being managed. |