E
- the type of entry in this EventQueuepublic class EventQueue<E> extends LinkedBlockingQueue<E>
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
Constructor and Description |
---|
EventQueue() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
void |
awaitEventCount(int expectedEventCount,
int timeoutDuration,
TimeUnit timeoutUnit)
Await a specific event count
|
boolean |
offer(E o) |
void |
shutdown()
Shutdown the queue.
|
clear, contains, drainTo, drainTo, iterator, offer, peek, poll, poll, put, remainingCapacity, remove, size, spliterator, take, toArray, toArray, toString
addAll, element, remove
containsAll, isEmpty, removeAll, retainAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, stream
public static final boolean DEBUG
public boolean add(E o)
add
in interface Collection<E>
add
in interface BlockingQueue<E>
add
in interface Queue<E>
add
in class AbstractQueue<E>
public void awaitEventCount(int expectedEventCount, int timeoutDuration, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException
expectedEventCount
- the number of events to wait fortimeoutDuration
- the timeout durationtimeoutUnit
- the timeout unitTimeoutException
- if timeout while waiting for the event countInterruptedException
- if await was interruptedpublic boolean offer(E o)
offer
in interface BlockingQueue<E>
offer
in interface Queue<E>
offer
in class LinkedBlockingQueue<E>
public void shutdown()
Copyright © 1995–2024 Mort Bay Consulting. All rights reserved.