@ CommandArgument public void stop ( ) { System . out . println ( "Stopping worker" ) ; worker . shutdown ( ) ; workerThread . interrupt ( ) ; try { workerThread . join ( ) ; } catch ( InterruptedException e ) { logger . warn ( "Joining to worker thread interrupted" , e ) ; } worker = null ; workerThread = null ; taskProgressStates = null ; }
Stops the worker process .