QuicTimerQueue
is usually associated with an instance of QuicSelector which
provides the timer/wakeup facility.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final QuicTimerQueue. | |
| private volatile boolean | |
| private final Logger | |
| private final ConcurrentLinkedQueue | |
| private static final AtomicLong | |
| private static final QuicTimerQueue. | |
| private final Runnable | |
| private final SequentialScheduler | |
| private final Set | |
| private volatile Deadline | |
| private final ConcurrentSkipListSet | |
| private volatile Deadline |
| Access | Constructor and Description |
|---|---|
| public | QuicTimerQueue(Runnable
A notifier to wake up the timer thread when
new event have been added and the next
deadline has changed. notifier, Logger debug)Creates a new timer queue with the given notifier. |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| private String | |
| private Deadline | |
| private static boolean | |
| private Deadline | |
| public static long | Returns: a unique id for a newQuicTimedEventReturns a unique id for a new |
| public Deadline | |
| private boolean | |
| public void | offer(QuicTimedEvent
an event to be scheduled event)Schedule the given event by adding it to the timer queue. |
| public Deadline | |
| private void | |
| public Deadline | Returns: the next unexpired deadline, orDeadline#MAX
if the queue is empty.The point in time before which events are
considered to be due. Usually, that's now. now, Executor An executor to process events which are due. executor)Process all events that were due before |
| private int | |
| private int | |
| public void | |
| public void | reschedule(QuicTimedEvent
an event to reschedule event, Deadline the prospective future deadline at which the event should
be rescheduled deadline)Reschedule the given |
| private Deadline | |
| public void |
| CEILING | back to summary |
|---|---|
| private static final QuicTimerQueue. | |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| debug | back to summary |
|---|---|
| private final Logger debug | |
| due | back to summary |
|---|---|
| private final ConcurrentLinkedQueue<QuicTimedEvent> due | |
| EVENTIDS | back to summary |
|---|---|
| private static final AtomicLong EVENTIDS | |
| FLOOR | back to summary |
|---|---|
| private static final QuicTimerQueue. | |
| notifier | back to summary |
|---|---|
| private final Runnable notifier | |
| processor | back to summary |
|---|---|
| private final SequentialScheduler processor | |
| rescheduled | back to summary |
|---|---|
| private final Set<QuicTimedEvent> rescheduled | |
| returnedDeadline | back to summary |
|---|---|
| private volatile Deadline returnedDeadline | |
| scheduled | back to summary |
|---|---|
| private final ConcurrentSkipListSet<QuicTimedEvent> scheduled | |
| scheduledDeadline | back to summary |
|---|---|
| private volatile Deadline scheduledDeadline | |
| QuicTimerQueue | back to summary |
|---|---|
| public QuicTimerQueue(Runnable notifier, Logger debug) Creates a new timer queue with the given notifier.
A notifier is used to notify the timer thread that
new events have been added to the queue of scheduled
event. The notifier should wake up the thread and
trigger a call to either
| |
| d | back to summary |
|---|---|
| private String d(Deadline deadline) | |
| d | back to summary |
|---|---|
| private String d(Deadline now, Deadline deadline) | |
| debugNow | back to summary |
|---|---|
| private Deadline debugNow() | |
| isDue | back to summary |
|---|---|
| private static boolean isDue(final Deadline deadline, final Deadline now) | |
| min | back to summary |
|---|---|
| private Deadline min(Deadline one, Deadline two) | |
| newEventId | back to summary |
|---|---|
| public static long newEventId() Returns a unique id for a new
| |
| nextDeadline | back to summary |
|---|---|
| public Deadline nextDeadline() The next deadline for this timer queue. This is only weakly
consistent. If the queue is empty,
| |
| notify | back to summary |
|---|---|
| private boolean notify(Deadline deadline) | |
| offer | back to summary |
|---|---|
| public void offer(QuicTimedEvent event) Schedule the given event by adding it to the timer queue.
| |
| pendingScheduledDeadline | back to summary |
|---|---|
| public Deadline pendingScheduledDeadline() | |
| processDue | back to summary |
|---|---|
| private void processDue() | |
| processEventsAndReturnNextDeadline | back to summary |
|---|---|
| public Deadline processEventsAndReturnNextDeadline(Deadline now, Executor executor) Process all events that were due before
| |
| processRescheduled | back to summary |
|---|---|
| private int processRescheduled(Deadline now) | |
| processScheduled | back to summary |
|---|---|
| private int processScheduled(Deadline now) | |
| reschedule | back to summary |
|---|---|
| public void reschedule(QuicTimedEvent event) Reschedule the given API Note This method is used if the prospective future deadline at which the event
should be scheduled is not known by the caller.
This may cause an idle wakeup in the selector thread owning this
| |
| reschedule | back to summary |
|---|---|
| public void reschedule(QuicTimedEvent event, Deadline deadline) Reschedule the given API Note This method should be used in preference of
| |
| scheduled | back to summary |
|---|---|
| private Deadline scheduled(Deadline deadline) | |
| stop | back to summary |
|---|---|
| public void stop() Called to clean up the timer queue when it is no longer needed. Makes sure that all pending tasks are cleared from the various lists. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final QuicTimerQueue. | CEILING
A |
| private final Deadline | |
| private final long | |
| public static final QuicTimerQueue. | FLOOR
A |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Deadline | deadline()
Implements jdk. Returns the deadline at which the event should be triggered,
or |
| public long | eventId()
Implements jdk. An event id, obtained at construction time from
|
| public Deadline | |
| public Deadline | refreshDeadline()
Implements jdk. Called to cause an event to refresh its deadline. |
| public static QuicTimerQueue. | |
| public static QuicTimerQueue. |
| CEILING | back to summary |
|---|---|
| public static final QuicTimerQueue. A API Note The intended usage is:
| |
| deadline | back to summary |
|---|---|
| private final Deadline deadline | |
| eventId | back to summary |
|---|---|
| private final long eventId | |
| FLOOR | back to summary |
|---|---|
| public static final QuicTimerQueue. A API Note The intended usage is:
| |
| Marker | back to summary |
|---|---|
| private Marker(Deadline deadline, long eventId) | |
| deadline | back to summary |
|---|---|
| public Deadline deadline() Implements jdk. Doc from jdk. Returns the deadline at which the event should be triggered,
or
| |
| eventId | back to summary |
|---|---|
| public long eventId() Implements jdk. Doc from jdk. An event id, obtained at construction time from
| |
| handle | back to summary |
|---|---|
| public Deadline handle() Implements jdk. Doc from jdk. Handles the triggered event.
Returns a new deadline, if the event needs to be
rescheduled, or
| |
| refreshDeadline | back to summary |
|---|---|
| public Deadline refreshDeadline() Implements jdk. Doc from jdk. Called to cause an event to refresh its deadline.
This method is called by the
| |
| valueOf | back to summary |
|---|---|
| public static QuicTimerQueue. | |
| values | back to summary |
|---|---|
| public static QuicTimerQueue. | |