@Override public void handleStop() { if (isStoppable()) { stopInProcess(); } }
private LocatorState stopInProcess() { if (isStoppable()) { this.locator.stop(); this.locator = null; this.process.stop(this.deletePidFileOnStop); this.process = null; INSTANCE.compareAndSet(this, null); // note: other thread may return Status.NOT_RESPONDING now this.running.set(false); return new LocatorState(this, Status.STOPPED); } else { return new LocatorState(this, Status.NOT_RESPONDING); } }
final LocatorLauncher launcher = getInstance(); if (isStoppable()) { return stopInProcess();