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.Object
Bucket 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.HashedWheelTimeout
head
private HashedWheelTimer.HashedWheelTimeout
tail
-
Constructor Summary
Constructors Modifier Constructor Description private
HashedWheelBucket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTimeout(HashedWheelTimer.HashedWheelTimeout timeout)
AddHashedWheelTimer.HashedWheelTimeout
to this bucket.void
clearTimeouts(java.util.Set<Timeout> set)
Clear this bucket and return all not expired / cancelledTimeout
s.void
expireTimeouts(long deadline)
Expire allHashedWheelTimer.HashedWheelTimeout
s for the givendeadline
.private HashedWheelTimer.HashedWheelTimeout
pollTimeout()
HashedWheelTimer.HashedWheelTimeout
remove(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.HashedWheelTimeout
to this bucket.
-
expireTimeouts
public void expireTimeouts(long deadline)
Expire allHashedWheelTimer.HashedWheelTimeout
s 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 / cancelledTimeout
s.
-
pollTimeout
private HashedWheelTimer.HashedWheelTimeout pollTimeout()
-
-