private void rescheduleTask ( AtomicReference < TimerTask > taskRef , long millis ) { ProcessorTask newTask = new ProcessorTask ( ) ; timer . schedule ( newTask , millis ) ; swapAndCancelTask ( taskRef , newTask ) ; }
Reschedules the specified task cancelling existing one if applicable .