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, wait
dispose
public final void putNow(Serializable o)
QueueStoreDelegate
putNow
in interface QueueStoreDelegate
public final boolean offer(Serializable o, int room, long timeout) throws InterruptedException
QueueStoreDelegate
offer
in interface QueueStoreDelegate
InterruptedException
public final Serializable poll(long timeout) throws InterruptedException
QueueStoreDelegate
poll
in interface QueueStoreDelegate
InterruptedException
public final Serializable peek() throws InterruptedException
QueueStoreDelegate
peek
in interface QueueStoreDelegate
InterruptedException
public final void untake(Serializable item) throws InterruptedException
QueueStoreDelegate
untake
in interface QueueStoreDelegate
InterruptedException
public final void clear() throws InterruptedException
QueueStoreDelegate
clear
in interface QueueStoreDelegate
InterruptedException
public final boolean addAll(Collection<? extends Serializable> items)
QueueStoreDelegate
addAll
in interface QueueStoreDelegate
items
- to be added to the queuepublic int getSize()
QueueStoreDelegate
getSize
in interface QueueStoreDelegate
protected abstract int size()
protected abstract Serializable getFirst() throws InterruptedException
InterruptedException
protected abstract Serializable removeFirst() throws InterruptedException
InterruptedException
protected abstract void add(Serializable item)
item
- object to addprotected abstract void addFirst(Serializable item) throws InterruptedException
item
- object to addInterruptedException
protected abstract boolean doAddAll(Collection<? extends Serializable> items)
items
- objects to addprotected abstract void doClear()
protected abstract boolean isEmpty()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.