private void internalSetMode(final Mode newMode) { assert holdsLock(this); final ServiceController.Mode oldMode = mode; if (oldMode == Mode.REMOVE) { if (state.compareTo(Substate.REMOVING) >= 0) { throw new IllegalStateException("Service already removed"); } } mode = newMode; }
private void internalSetMode(final Mode newMode) { assert holdsLock(this); final ServiceController.Mode oldMode = mode; if (oldMode == Mode.REMOVE) { if (state.compareTo(Substate.REMOVING) >= 0) { throw new IllegalStateException("Service already removed"); } } mode = newMode; }
/** * Return {@code true} only if this service controller installation is committed. * * @return true if this service controller installation is committed */ boolean isInstallationCommitted() { assert holdsLock(this); // should not be NEW nor CANCELLED return state.compareTo(Substate.CANCELLED) > 0; }
/** * Return {@code true} only if this service controller installation is committed. * * @return true if this service controller installation is committed */ boolean isInstallationCommitted() { assert holdsLock(this); // should not be NEW nor CANCELLED return state.compareTo(Substate.CANCELLED) > 0; }