public final class MailAccessQueueImpl extends java.lang.Object implements MailAccessQueue
MailAccessQueueImpl - A Queue additionally providing pollDelayed() method to obtain expired elements.
Note: This queue is not thread-safe!
| Constructor and Description |
|---|
MailAccessQueueImpl(int capacity)
Creates a new MailAccessQueue that is initially empty.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(PooledMailAccess o) |
boolean |
addAll(java.util.Collection<? extends PooledMailAccess> c) |
void |
clear() |
java.util.Comparator<? super PooledMailAccess> |
comparator() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
PooledMailAccess |
element() |
boolean |
equals(java.lang.Object obj) |
int |
getCapacity()
Gets the capacity.
|
int |
hashCode() |
boolean |
isDeprecated()
Checks if this queue is marked as deprecated.
|
boolean |
isEmpty() |
java.util.Iterator<PooledMailAccess> |
iterator() |
void |
markDeprecated()
Marks this queue as deprecated.
|
boolean |
offer(PooledMailAccess o) |
PooledMailAccess |
peek() |
PooledMailAccess |
poll() |
PooledMailAccess |
pollDelayed()
Retrieves and removes the head of this queue, or null if head has not expired, yet.
|
PooledMailAccess |
remove() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
public MailAccessQueueImpl(int capacity)
capacity - The queue's capacity or -1 if unboundedpublic int getCapacity()
MailAccessQueuegetCapacity in interface MailAccessQueuepublic void markDeprecated()
markDeprecated in interface MailAccessQueuepublic boolean isDeprecated()
isDeprecated in interface MailAccessQueuetrue if this queue is marked as deprecated; otherwise falsepublic PooledMailAccess pollDelayed()
pollDelayed in interface MailAccessQueuepublic int hashCode()
hashCode in interface java.util.Collection<PooledMailAccess>hashCode in class java.lang.Objectpublic PooledMailAccess remove()
remove in interface java.util.Queue<PooledMailAccess>public boolean isEmpty()
isEmpty in interface java.util.Collection<PooledMailAccess>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<PooledMailAccess>public PooledMailAccess element()
element in interface java.util.Queue<PooledMailAccess>public boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<PooledMailAccess>equals in class java.lang.Objectpublic boolean addAll(java.util.Collection<? extends PooledMailAccess> c)
addAll in interface java.util.Collection<PooledMailAccess>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<PooledMailAccess>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<PooledMailAccess>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<PooledMailAccess>public boolean offer(PooledMailAccess o)
offer in interface java.util.Queue<PooledMailAccess>public PooledMailAccess peek()
peek in interface java.util.Queue<PooledMailAccess>public boolean add(PooledMailAccess o)
add in interface java.util.Collection<PooledMailAccess>add in interface java.util.Queue<PooledMailAccess>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<PooledMailAccess>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<PooledMailAccess>public java.util.Iterator<PooledMailAccess> iterator()
iterator in interface java.lang.Iterable<PooledMailAccess>iterator in interface java.util.Collection<PooledMailAccess>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<PooledMailAccess>public java.lang.String toString()
toString in class java.lang.Objectpublic int size()
size in interface java.util.Collection<PooledMailAccess>public void clear()
clear in interface java.util.Collection<PooledMailAccess>public PooledMailAccess poll()
poll in interface java.util.Queue<PooledMailAccess>public java.util.Comparator<? super PooledMailAccess> comparator()