|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.async.AsyncQueue<K,E>
public class AsyncQueue<K,E>
Class implements Map
-like collection, maps keys to values, where
single key could have queue of correspondent values.
Nested Class Summary | |
---|---|
protected class |
AsyncQueue.AsyncQueueEntry
AsyncQueue data unit |
Constructor Summary | |
---|---|
AsyncQueue()
|
Method Summary | |
---|---|
void |
clear()
|
protected AsyncQueue.AsyncQueueEntry |
getAsyncQueueEntry(K key)
|
boolean |
isEmpty(K key)
Checks if K key related queue is empty. |
protected AsyncQueue.AsyncQueueEntry |
obtainAsyncQueueEntry(K key)
|
void |
offer(K key,
E queueRecord)
Add data to the AsyncQueue , corresponding to the given
E key |
E |
peek(K key)
Get head element of E key related queue. |
E |
poll(K key)
Get head element of K key related queue. |
void |
removeEntry(K key)
Remove head element of K key related queue. |
int |
size(K key)
Get the size of K key related queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncQueue()
Method Detail |
---|
public void offer(K key, E queueRecord)
AsyncQueue
, corresponding to the given
E
key
key
- E
queueRecord
- data unitpublic E peek(K key)
E
key related queue.
Element will not be removed from queue.
key
- K
E
data unitpublic E poll(K key)
K
key related queue.
Element will be removed from queue.
key
- K
E
data unitpublic void removeEntry(K key)
K
key related queue.
key
- K
public int size(K key)
K
key related queue.
key
- K
K
key related queue.public boolean isEmpty(K key)
K
key related queue is empty.
key
- K
K
key related queue is empty, false otherwisepublic void clear()
protected AsyncQueue.AsyncQueueEntry obtainAsyncQueueEntry(K key)
protected AsyncQueue.AsyncQueueEntry getAsyncQueueEntry(K key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |