Package io.netty.util
Class HashedWheelTimer.HashedWheelBucket
- java.lang.Object
-
- io.netty.util.HashedWheelTimer.HashedWheelBucket
-
- Enclosing class:
- HashedWheelTimer
private static final class HashedWheelTimer.HashedWheelBucket extends java.lang.ObjectBucket that stores HashedWheelTimeouts. These are stored in a linked-list like datastructure to allow easy removal of HashedWheelTimeouts in the middle. Also the HashedWheelTimeout act as nodes themself and so no extra object creation is needed.
-
-
Field Summary
Fields Modifier and Type Field Description private HashedWheelTimer.HashedWheelTimeoutheadprivate HashedWheelTimer.HashedWheelTimeouttail
-
Constructor Summary
Constructors Modifier Constructor Description privateHashedWheelBucket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTimeout(HashedWheelTimer.HashedWheelTimeout timeout)AddHashedWheelTimer.HashedWheelTimeoutto this bucket.voidclearTimeouts(java.util.Set<Timeout> set)Clear this bucket and return all not expired / cancelledTimeouts.voidexpireTimeouts(long deadline)Expire allHashedWheelTimer.HashedWheelTimeouts for the givendeadline.private HashedWheelTimer.HashedWheelTimeoutpollTimeout()HashedWheelTimer.HashedWheelTimeoutremove(HashedWheelTimer.HashedWheelTimeout timeout)
-
-
-
Field Detail
-
head
private HashedWheelTimer.HashedWheelTimeout head
-
tail
private HashedWheelTimer.HashedWheelTimeout tail
-
-
Method Detail
-
addTimeout
public void addTimeout(HashedWheelTimer.HashedWheelTimeout timeout)
AddHashedWheelTimer.HashedWheelTimeoutto this bucket.
-
expireTimeouts
public void expireTimeouts(long deadline)
Expire allHashedWheelTimer.HashedWheelTimeouts for the givendeadline.
-
remove
public HashedWheelTimer.HashedWheelTimeout remove(HashedWheelTimer.HashedWheelTimeout timeout)
-
clearTimeouts
public void clearTimeouts(java.util.Set<Timeout> set)
Clear this bucket and return all not expired / cancelledTimeouts.
-
pollTimeout
private HashedWheelTimer.HashedWheelTimeout pollTimeout()
-
-