public void terminating ( ) { try { stateLock . writeLock ( ) . lock ( ) ; if ( state == State . Running ) { state = State . Shutdown ; stateChange . signalAll ( ) ; } } finally { stateLock . writeLock ( ) . unlock ( ) ; } }
Makes a transaction from the Running state to the Shutdown state or no transition if the current state is not Running .