Class AbstractService.StateSnapshot
java.lang.Object
com.google.common.util.concurrent.AbstractService.StateSnapshot
- Enclosing class:
AbstractService
An immutable snapshot of the current state of the service. This class represents a consistent
snapshot of the state and therefore it can be used to answer simple queries without needing to
grab a lock.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Throwable
The exception that caused this service to fail.(package private) final boolean
If true, the user requested a shutdown while the service was still starting up.(package private) final Service.State
The internal state, which equals external state unless shutdownWhenStartupFinishes is true. -
Constructor Summary
ConstructorsConstructorDescriptionStateSnapshot
(Service.State internalState) StateSnapshot
(Service.State internalState, boolean shutdownWhenStartupFinishes, Throwable failure) -
Method Summary
-
Field Details
-
state
The internal state, which equals external state unless shutdownWhenStartupFinishes is true. -
shutdownWhenStartupFinishes
final boolean shutdownWhenStartupFinishesIf true, the user requested a shutdown while the service was still starting up. -
failure
The exception that caused this service to fail. This will benull
unless the service has failed.
-
-
Constructor Details
-
StateSnapshot
StateSnapshot(Service.State internalState) -
StateSnapshot
StateSnapshot(Service.State internalState, boolean shutdownWhenStartupFinishes, @CheckForNull Throwable failure)
-
-
Method Details
-
externalState
Service.State externalState()- See Also:
-
failureCause
Throwable failureCause()- See Also:
-