|
|||||||||||
| 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(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 |
List |
getContents()
Retrieve a shallow copy of the contents as a list |
long |
getLocalMemoryUsedByThisQueue()
|
String |
getName()
|
boolean |
isEmpty()
|
boolean |
isStarted()
|
boolean |
remove(Packet packet)
Remove a packet from the queue |
Packet |
remove(String id)
Remove a Packet by it's id |
int |
size()
|
void |
start()
enable dequeueing |
void |
stop()
disable dequeueing |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
MemoryBoundedQueue(String name,
MemoryBoundedQueueManager manager)
name - manager - | Method Detail |
public String getName()
getName in interface BoundedPacketQueuepublic 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 InterruptedException
packet -
InterruptedException
public Packet dequeue()
throws InterruptedException
dequeue in interface BoundedPacketQueueInterruptedException
public Packet dequeue(long timeInMillis)
throws InterruptedException
dequeue in interface BoundedPacketQueuetimeInMillis - time to wait for a Packet to be available
InterruptedException
public Packet dequeueNoWait()
throws InterruptedException
dequeueNoWait in interface BoundedPacketQueueInterruptedExceptionpublic boolean isStarted()
isStarted in interface BoundedPacketQueuepublic void stop()
stop in interface BoundedPacketQueuepublic void start()
start in interface BoundedPacketQueuepublic boolean remove(Packet packet)
packet -
public Packet remove(String id)
id -
public void clear()
clear in interface BoundedPacketQueuepublic boolean isEmpty()
isEmpty in interface BoundedPacketQueuepublic Packet get(int index)
index -
public List getContents()
getContents in interface BoundedPacketQueue
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||