Class AbstractService.StateSnapshot

java.lang.Object
com.google.common.util.concurrent.AbstractService.StateSnapshot
Enclosing class:
AbstractService

private static final class AbstractService.StateSnapshot extends 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 Details

    • 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

      @CheckForNull final Throwable failure
      The exception that caused this service to fail. This will be null unless the service has failed.
  • Constructor Details

    • StateSnapshot

      StateSnapshot(Service.State internalState)
    • StateSnapshot

      StateSnapshot(Service.State internalState, boolean shutdownWhenStartupFinishes, @CheckForNull Throwable failure)
  • Method Details