public class DiskQueue<E extends java.io.Serializable>
extends java.util.AbstractQueue<E>
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_REFILL_RATIO |
Constructor and Description |
---|
DiskQueue(int maxInMemorySize)
Construct a disk-backed queue that keeps at most
|
DiskQueue(int maxInMemorySize,
java.util.Comparator<? super E> comparator) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
protected void |
finalize() |
java.util.Iterator<E> |
iterator() |
boolean |
offer(E element) |
E |
peek() |
E |
poll() |
E |
remove() |
int |
size() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
public static final float DEFAULT_REFILL_RATIO
public DiskQueue(int maxInMemorySize)
maxInMemorySize
- Maximum number of elements to keep in memory.public DiskQueue(int maxInMemorySize, java.util.Comparator<? super E> comparator)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.util.Iterator<E> iterator()
public int size()
public boolean offer(E element)
public E peek()
public E remove()
public E poll()
Copyright © 2012 Bixo Labs