Future < Boolean > shutdown ( ) { // Create a simple executor that will do the backgrounding for us ... final ExecutorService executor = Executors . newSingleThreadExecutor ( new NamedThreadFactory ( "modeshape-repository-stop" ) ) ; try { // Submit a runnable to terminate all sessions ... return executor . submit ( ( ) -> doShutdown ( false ) ) ; } finally { // Now shutdown the executor and return the future ... executor . shutdown ( ) ; } }
Terminate all active sessions .