public final class SingletonMailAccessQueue extends java.lang.Object implements MailAccessQueue
SingletonMailAccessQueue
- A thread-safe singleton queue backed by an AtomicReference
instance.Constructor and Description |
---|
SingletonMailAccessQueue()
Initializes a new
SingletonMailAccessQueue . |
Modifier and Type | Method and Description |
---|---|
boolean |
add(PooledMailAccess pooledMailAccess) |
boolean |
addAll(java.util.Collection<? extends PooledMailAccess> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
PooledMailAccess |
element() |
int |
getCapacity()
Gets the capacity.
|
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 pooledMailAccess) |
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) |
public SingletonMailAccessQueue()
SingletonMailAccessQueue
.public int getCapacity()
MailAccessQueue
getCapacity
in interface MailAccessQueue
public PooledMailAccess pollDelayed()
MailAccessQueue
pollDelayed
in interface MailAccessQueue
public boolean offer(PooledMailAccess pooledMailAccess)
offer
in interface java.util.Queue<PooledMailAccess>
public PooledMailAccess poll()
poll
in interface java.util.Queue<PooledMailAccess>
public PooledMailAccess remove()
remove
in interface java.util.Queue<PooledMailAccess>
public PooledMailAccess peek()
peek
in interface java.util.Queue<PooledMailAccess>
public PooledMailAccess element()
element
in interface java.util.Queue<PooledMailAccess>
public int size()
size
in interface java.util.Collection<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 java.util.Iterator<PooledMailAccess> iterator()
iterator
in interface java.lang.Iterable<PooledMailAccess>
iterator
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 add(PooledMailAccess pooledMailAccess)
add
in interface java.util.Collection<PooledMailAccess>
add
in interface java.util.Queue<PooledMailAccess>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<PooledMailAccess>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<PooledMailAccess>
public boolean addAll(java.util.Collection<? extends PooledMailAccess> c)
addAll
in interface java.util.Collection<PooledMailAccess>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<PooledMailAccess>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<PooledMailAccess>
public void clear()
clear
in interface java.util.Collection<PooledMailAccess>
public void markDeprecated()
MailAccessQueue
markDeprecated
in interface MailAccessQueue
public boolean isDeprecated()
MailAccessQueue
isDeprecated
in interface MailAccessQueue
true
if this queue is marked as deprecated; otherwise false