Class Timer


  • public final class Timer
    extends java.lang.Object
    Hashed-wheel timer singleton. Care must be taken to shutdown the timer only when the VM is ready to exit.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.netty.util.Timeout newTimeout​(io.netty.util.TimerTask task, long delay, java.util.concurrent.TimeUnit unit)
      Executes one-shot timer task on shared thread pool.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newTimeout

        public static io.netty.util.Timeout newTimeout​(io.netty.util.TimerTask task,
                                                       long delay,
                                                       java.util.concurrent.TimeUnit unit)
        Executes one-shot timer task on shared thread pool.
        Parameters:
        task - timer task to execute
        delay - before executing the task
        unit - of delay
        Returns:
        a handle which is associated with the specified task