Class HashedWheelTimer.Worker

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    HashedWheelTimer

    private final class HashedWheelTimer.Worker
    extends java.lang.Object
    implements java.lang.Runnable
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Worker()  
    • Field Detail

      • unprocessedTimeouts

        private final java.util.Set<Timeout> unprocessedTimeouts
      • tick

        private long tick
    • Constructor Detail

      • Worker

        private Worker()
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • transferTimeoutsToBuckets

        private void transferTimeoutsToBuckets()
      • waitForNextTick

        private long waitForNextTick()
        calculate goal nanoTime from startTime and current tick number, then wait until that goal has been reached.
        Returns:
        Long.MIN_VALUE if received a shutdown request, current time otherwise (with Long.MIN_VALUE changed by +1)
      • unprocessedTimeouts

        public java.util.Set<Timeout> unprocessedTimeouts()