Package io.netty.util
Class HashedWheelTimer.Worker
- java.lang.Object
-
- io.netty.util.HashedWheelTimer.Worker
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- HashedWheelTimer
private final class HashedWheelTimer.Worker extends java.lang.Object implements java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description private long
tick
private java.util.Set<Timeout>
unprocessedTimeouts
-
Constructor Summary
Constructors Modifier Constructor Description private
Worker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
processCancelledTasks()
void
run()
private void
transferTimeoutsToBuckets()
java.util.Set<Timeout>
unprocessedTimeouts()
private long
waitForNextTick()
calculate goal nanoTime from startTime and current tick number, then wait until that goal has been reached.
-
-
-
Field Detail
-
unprocessedTimeouts
private final java.util.Set<Timeout> unprocessedTimeouts
-
tick
private long tick
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
transferTimeoutsToBuckets
private void transferTimeoutsToBuckets()
-
processCancelledTasks
private void processCancelledTasks()
-
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()
-
-