|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.message.util.MemoryBoundedQueue
MemoryBoundedQueue is a queue bounded by memory usage for Packets
| Constructor Summary | |
(package private) |
MemoryBoundedQueue(java.lang.String name,
MemoryBoundedQueueManager manager)
Constructor |
| Method Summary | |
void |
clear()
remove any Packets in the queue |
void |
close()
close and remove this queue from the MemoryBoundedQueueManager |
Packet |
dequeue()
|
Packet |
dequeue(long timeInMillis)
Dequeues a Packet from the head of the queue |
Packet |
dequeueNoWait()
dequeues a Packet from the head of the queue |
void |
enqueue(Packet packet)
Enqueue a Packet to this queue |
void |
enqueueFirst(Packet packet)
Enqueue a Packet to the head of the queue |
void |
enqueueFirstNoBlock(Packet packet)
Enqueue a packet to the head of the queue with total disregard for memory constraints |
void |
enqueueNoBlock(Packet packet)
Enqueue a Packet without checking memory usage limits |
Packet |
get(int index)
retrieve a Packet at an indexed position in the queue |
java.util.List |
getContents()
Retrieve a shallow copy of the contents as a list |
long |
getLocalMemoryUsedByThisQueue()
|
java.lang.String |
getName()
|
boolean |
isEmpty()
|
boolean |
isStarted()
|
boolean |
remove(Packet packet)
Remove a packet from the queue |
int |
size()
|
void |
start()
enable dequeueing |
void |
stop()
disable dequeueing |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
MemoryBoundedQueue(java.lang.String name,
MemoryBoundedQueueManager manager)
name - manager - | Method Detail |
public java.lang.String getName()
getName in interface BoundedPacketQueuepublic java.lang.String toString()
public int size()
size in interface BoundedPacketQueuepublic long getLocalMemoryUsedByThisQueue()
public void close()
close in interface BoundedPacketQueuepublic void enqueueNoBlock(Packet packet)
enqueueNoBlock in interface BoundedPacketQueuepacket - public void enqueue(Packet packet)
enqueue in interface BoundedPacketQueuepacket - public final void enqueueFirstNoBlock(Packet packet)
packet -
public void enqueueFirst(Packet packet)
throws java.lang.InterruptedException
packet -
java.lang.InterruptedException
public Packet dequeue()
throws java.lang.InterruptedException
dequeue in interface BoundedPacketQueuejava.lang.InterruptedException
public Packet dequeue(long timeInMillis)
throws java.lang.InterruptedException
dequeue in interface BoundedPacketQueuetimeInMillis - time to wait for a Packet to be available
java.lang.InterruptedException
public Packet dequeueNoWait()
throws java.lang.InterruptedException
dequeueNoWait in interface BoundedPacketQueuejava.lang.InterruptedExceptionpublic boolean isStarted()
isStarted in interface BoundedPacketQueuepublic void stop()
stop in interface BoundedPacketQueuepublic void start()
start in interface BoundedPacketQueuepublic boolean remove(Packet packet)
packet -
public void clear()
clear in interface BoundedPacketQueuepublic boolean isEmpty()
isEmpty in interface BoundedPacketQueuepublic Packet get(int index)
index -
public java.util.List getContents()
getContents in interface BoundedPacketQueue
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||