|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.util.SizeRestrictedQueue
public class SizeRestrictedQueue
This class implements a queue that is restricted in size. If too much objects are queued in, the oldest values get disposed.
| Constructor Summary | |
|---|---|
SizeRestrictedQueue(int maxSize)
This is the constructor. |
|
| Method Summary | |
|---|---|
boolean |
contains(java.lang.Object obj)
Checks if the queue contains the given element. |
void |
enqueue(java.lang.Object obj,
boolean removeExisting)
This method adds an element to a queue. |
void |
setDisposalListener(DisposalListener disposalListener)
This method sets a disposal listener which gets called when an element gets removed from the queue. |
int |
size()
Gets the current size of the queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SizeRestrictedQueue(int maxSize)
maxSize - The maximum size of the queue| Method Detail |
|---|
public int size()
public void enqueue(java.lang.Object obj,
boolean removeExisting)
obj - The object to be enqueuedremoveExisting - true If the queue already contains the object, the object will be moved to the begin of the queue.public boolean contains(java.lang.Object obj)
public void setDisposalListener(DisposalListener disposalListener)
disposalListener - The disposal listener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||