public class PersistentQueue<T>
extends java.util.AbstractQueue<T>
Queue implementation that delegates the actual storage of the
elements in the queue to a QueuePersistor.| Constructor and Description |
|---|
PersistentQueue(QueuePersistor<T> persistor)
Create a PersistentQueue using the given
QueuePersistor. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying
QueuePersistor and release any resources. |
java.util.Iterator<T> |
iterator() |
boolean |
offer(T obj) |
T |
peek() |
T |
poll() |
int |
size() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic PersistentQueue(@Nullable
QueuePersistor<T> persistor)
QueuePersistor.persistor - public void close()
QueuePersistor and release any resources.@Nonnull public java.util.Iterator<T> iterator()
public int size()
public boolean offer(T obj)
public T poll()
public T peek()