public static Schedulers stopAll ( ) { createSingleton ( ) ; if ( instance . runningSchedullers . isEmpty ( ) ) { throw new IllegalStateException ( "No schedulers available." ) ; } for ( Entry < String , ScheduledFuture < ? > > entry : instance . runningSchedullers . entrySet ( ) ) { ScheduledFuture < ? > future = entry . getValue ( ) ; future . cancel ( true ) ; Schedulers . decreaseNoOfSchedullers ( ) ; Schedulers . decreaseNoOfRunningSchedullers ( ) ; } return instance ; }
Stop all .