public void shutdown ( ) throws ModuleShutdownException { try { consumerThread . shutdown ( ) ; reader . shutdown ( ) ; recoveryLog . shutdown ( "Server is shutting down." ) ; } catch ( JournalException e ) { throw new ModuleShutdownException ( "Error closing journal reader." , role , e ) ; } }
Tell the thread the reader and the log to shut down .