Home | History | Annotate | Download | only in service

Lines Matching refs:State

39   private volatile State state;
45 public synchronized final Future<State> start() {
46 Preconditions.checkState(state != State.STOPPED,
50 if (state == State.STARTED) {
51 return new FutureTask<State>(DO_NOTHING, State.STARTED);
54 return executor.submit(new Callable<State>() {
55 public State call() {
57 return state = State.STARTED;
71 public synchronized final Future<State> stop() {
72 Preconditions.checkState(state != null, "Must start this service before you stop it!");
75 if (state == State.STOPPED) {
76 return new FutureTask<State>(DO_NOTHING, State.STOPPED);
79 return executor.submit(new Callable<State>() {
80 public State call() {
82 return state = State.STOPPED;
96 public final State state() {
97 return state;