Class AbstractService.StateSnapshot
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractService.StateSnapshot
-
- Enclosing class:
- AbstractService
private static final class AbstractService.StateSnapshot extends java.lang.Object
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
Fields Modifier and Type Field Description (package private) java.lang.Throwable
failure
The exception that caused this service to fail.(package private) boolean
shutdownWhenStartupFinishes
If true, the user requested a shutdown while the service was still starting up.(package private) Service.State
state
The internal state, which equals external state unless shutdownWhenStartupFinishes is true.
-
Constructor Summary
Constructors Constructor Description StateSnapshot(Service.State internalState)
StateSnapshot(Service.State internalState, boolean shutdownWhenStartupFinishes, java.lang.Throwable failure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Service.State
externalState()
(package private) java.lang.Throwable
failureCause()
-
-
-
Field Detail
-
state
final Service.State state
The internal state, which equals external state unless shutdownWhenStartupFinishes is true.
-
shutdownWhenStartupFinishes
final boolean shutdownWhenStartupFinishes
If true, the user requested a shutdown while the service was still starting up.
-
failure
final java.lang.Throwable failure
The exception that caused this service to fail. This will benull
unless the service has failed.
-
-
Constructor Detail
-
StateSnapshot
StateSnapshot(Service.State internalState)
-
StateSnapshot
StateSnapshot(Service.State internalState, boolean shutdownWhenStartupFinishes, java.lang.Throwable failure)
-
-
Method Detail
-
externalState
Service.State externalState()
- See Also:
Service.state()
-
failureCause
java.lang.Throwable failureCause()
- See Also:
Service.failureCause()
-
-