/** * Permanently terminates this controller. * * @return true iff the controller was terminated. * * @see #isTerminated() */ protected final boolean terminate() { if (!this.terminated.getAndSet(true)) { this.cleanup(); if (this.monitoringController != null) { this.monitoringController.terminate(); } return true; } return false; }
/** * Permanently terminates this controller. * * @return true iff the controller was terminated. * * @see #isTerminated() */ protected final boolean terminate() { if (!this.terminated.getAndSet(true)) { this.cleanup(); if (this.monitoringController != null) { this.monitoringController.terminate(); } return true; } return false; }