protected void cancelScheduledTasks ( ) { assert inEventLoop ( ) ; PriorityQueue < ScheduledFutureTask < ? > > scheduledTaskQueue = this . scheduledTaskQueue ; if ( isNullOrEmpty ( scheduledTaskQueue ) ) { return ; } final ScheduledFutureTask < ? > [ ] scheduledTasks = scheduledTaskQueue . toArray ( new ScheduledFutureTask < ? > [ 0 ] ) ; for ( ScheduledFutureTask < ? > task : scheduledTasks ) { task . cancelWithoutRemove ( false ) ; } scheduledTaskQueue . clearIgnoringIndexes ( ) ; }
Cancel all scheduled tasks .