/** * Stops the server and deletes the temporary files created by the server. Note that you don't usually need * to call this method manually because the server is automatically stopped at the end by JUnit. */ public final CompletableFuture<Void> stopAsync() { final com.linecorp.centraldogma.server.CentralDogma dogma = this.dogma; this.dogma = null; client = null; httpClient = null; if (dogma != null) { return dogma.stop(); } else { return CompletableFuture.completedFuture(null); } } }
@Override public synchronized void stop() throws Exception { switch (state) { case NONE: case INITIALIZED: case STOPPED: return; case DESTROYED: throw new IllegalStateException("can't stop after destruction"); } final CentralDogma dogma = this.dogma; assert dogma != null; this.dogma = null; dogma.stop().get(); state = State.STOPPED; }
@Override public synchronized void stop() throws Exception { switch (state) { case NONE: case INITIALIZED: case STOPPED: return; case DESTROYED: throw new IllegalStateException("can't stop after destruction"); } final CentralDogma dogma = this.dogma; assert dogma != null; this.dogma = null; dogma.stop().get(); state = State.STOPPED; }
@Override public synchronized void stop() throws Exception { switch (state) { case NONE: case INITIALIZED: case STOPPED: return; case DESTROYED: throw new IllegalStateException("can't stop after destruction"); } final CentralDogma dogma = this.dogma; assert dogma != null; this.dogma = null; dogma.stop().get(); state = State.STOPPED; }