public abstract class AbstractQueueStoreDelegate extends Object implements QueueStoreDelegate
| Constructor and Description |
|---|
AbstractQueueStoreDelegate(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
add(Serializable item)
Adds an item at the end of the queue
|
boolean |
addAll(Collection<? extends Serializable> items)
Appends all of the elements in the specified collection to the queue (optional operation).
|
protected abstract void |
addFirst(Serializable item)
Adds an object at the beginning of the queue
|
void |
clear()
Discards all the elements in the queue
|
protected abstract boolean |
doAddAll(Collection<? extends Serializable> items)
Adds all the items at the end of the queue
|
protected abstract void |
doClear()
Removes all the items in the queue
|
protected abstract Serializable |
getFirst()
reads the first element in the queue
|
int |
getSize()
Return the size of the queue
|
protected abstract boolean |
isEmpty() |
boolean |
offer(Serializable o,
int room,
long timeout)
Offer to append a new member to the end of the queue
|
Serializable |
peek()
return, but do not remove, the first member of the queue
|
Serializable |
poll(long timeout)
Poll the queue for its first member, and, if there is one, remove and return it
|
void |
putNow(Serializable o)
append a new member to the end of the queue
|
protected abstract Serializable |
removeFirst()
removes the first element in the queue
|
protected abstract int |
size() |
void |
untake(Serializable item)
Restore a previously removed member to the front of the queue
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisposepublic final void putNow(Serializable o)
QueueStoreDelegateputNow in interface QueueStoreDelegatepublic final boolean offer(Serializable o, int room, long timeout) throws InterruptedException
QueueStoreDelegateoffer in interface QueueStoreDelegateInterruptedExceptionpublic final Serializable poll(long timeout) throws InterruptedException
QueueStoreDelegatepoll in interface QueueStoreDelegateInterruptedExceptionpublic final Serializable peek() throws InterruptedException
QueueStoreDelegatepeek in interface QueueStoreDelegateInterruptedExceptionpublic final void untake(Serializable item) throws InterruptedException
QueueStoreDelegateuntake in interface QueueStoreDelegateInterruptedExceptionpublic final void clear()
throws InterruptedException
QueueStoreDelegateclear in interface QueueStoreDelegateInterruptedExceptionpublic final boolean addAll(Collection<? extends Serializable> items)
QueueStoreDelegateaddAll in interface QueueStoreDelegateitems - to be added to the queuepublic int getSize()
QueueStoreDelegategetSize in interface QueueStoreDelegateprotected abstract int size()
protected abstract Serializable getFirst() throws InterruptedException
InterruptedExceptionprotected abstract Serializable removeFirst() throws InterruptedException
InterruptedExceptionprotected abstract void add(Serializable item)
item - object to addprotected abstract void addFirst(Serializable item) throws InterruptedException
item - object to addInterruptedExceptionprotected abstract boolean doAddAll(Collection<? extends Serializable> items)
items - objects to addprotected abstract void doClear()
protected abstract boolean isEmpty()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.