public void stop ( ) throws Exception { final CountDownLatch latch = new CountDownLatch ( 1 ) ; this . serviceContainer . addTerminateListener ( info -> latch . countDown ( ) ) ; this . serviceContainer . shutdown ( ) ; latch . await ( ) ; executor . submit ( new Runnable ( ) { @ Override public void run ( ) { TempFileManager . deleteRecursively ( tmpDir ) ; } } ) ; executor . shutdown ( ) ; }
Stops the service container and cleans up all file system resources .