Home | History | Annotate | Download | only in base

Lines Matching refs:State

23  * An object with an operational state, plus asynchronous {@link #start()} and
24 * {@link #stop()} lifecycle methods to transfer into and out of this state.
28 * <li>{@link State#NEW} -&gt;</li>
29 * <li>{@link State#STARTING} -&gt;</li>
30 * <li>{@link State#RUNNING} -&gt;</li>
31 * <li>{@link State#STOPPING} -&gt;</li>
32 * <li>{@link State#TERMINATED}</li>
35 * If the service fails while starting, running or stopping, its state will be
36 * {@link State#FAILED}, and its behavior is undefined. Such a service cannot be
42 * the threading and state management easier.
49 * If the service state is {@link State#NEW}, this initiates service startup
57 * State#RUNNING}, {@link State#STOPPING} or {@link State#TERMINATED}. If
59 * ExecutionException}, and the service's state will be {@link
60 * State#FAILED}. If it has already finished starting, {@link Future#get}
64 Future<State> start();
74 * @return the state of the service when startup finished.
76 State startAndWait();
79 * Returns {@code true} if this service is {@link State#RUNNING running}.
84 * Returns the lifecycle state of the service.
86 State state();
89 * If the service is {@link State#STARTING} or {@link State#RUNNING}, this
91 * State#NEW}, it is {@link State#TERMINATED terminated} without having been
98 * State#TERMINATED} or throws an {@link ExecutionException}. If it has
103 Future<State> stop();
107 * finished stopping. If this is {@link State#STARTING}, startup will be
108 * cancelled. If this is {@link State#NEW}, it is {@link State#TERMINATED
115 * @return the state of the service when shutdown finished.
117 State stopAndWait();
122 public enum State {
125 * A service in this state is inactive. It does minimal work and consumes
131 * A service in this state is transitioning to {@link #RUNNING}.
136 * A service in this state is operational.
141 * A service in this state is transitioning to {@link #TERMINATED}.
146 * A service in this state has completed execution normally. It does minimal
152 * A service in this state has encountered a problem and may not be