|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.message.util.SpooledBoundedPacketQueue
Implements a controlled thread safe queue, with Packets being spooled to disk for reading asynchronously.
| Constructor Summary | |
SpooledBoundedPacketQueue(java.io.File dir,
java.lang.String name)
Constructor for SpooledBoundedPacketQueue |
|
SpooledBoundedPacketQueue(java.io.File dir,
java.lang.String name,
long maxDataLength,
int maxBlockSize)
Constructor for SpooledBoundedPacketQueue |
|
| Method Summary | |
void |
clear()
clear the queue |
void |
close()
close this queue |
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)
Place a Packet at the head of the Queue |
void |
enqueueNoBlock(Packet packet)
Enqueue a Packet without checking usage limits |
java.util.List |
getContents()
Retrieve a shallow copy of the contents as a list |
java.lang.String |
getName()
|
boolean |
isEmpty()
|
boolean |
isFull()
|
boolean |
isStarted()
|
int |
size()
|
void |
start()
enable dequeueing |
void |
stop()
disable dequeueing |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SpooledBoundedPacketQueue(java.io.File dir,
java.lang.String name,
long maxDataLength,
int maxBlockSize)
throws java.io.IOException
dir - name - maxDataLength - maxBlockSize -
java.io.IOException
public SpooledBoundedPacketQueue(java.io.File dir,
java.lang.String name)
throws java.io.IOException
dir - name -
java.io.IOException| Method Detail |
public void enqueue(Packet packet)
throws JMSException
enqueue in interface BoundedPacketQueuepacket -
JMSException
public void enqueueNoBlock(Packet packet)
throws JMSException
enqueueNoBlock in interface BoundedPacketQueuepacket -
JMSException
public Packet dequeue()
throws JMSException,
java.lang.InterruptedException
dequeue in interface BoundedPacketQueueJMSException
java.lang.InterruptedException
public Packet dequeue(long timeInMillis)
throws JMSException,
java.lang.InterruptedException
BoundedPacketQueue
dequeue in interface BoundedPacketQueuetimeInMillis - maximum time to wait to dequeue a Packet
JMSException
java.lang.InterruptedException
public Packet dequeueNoWait()
throws JMSException,
java.lang.InterruptedException
BoundedPacketQueue
dequeueNoWait in interface BoundedPacketQueueJMSException
java.lang.InterruptedExceptionpublic boolean isFull()
public void close()
close in interface BoundedPacketQueuepublic java.lang.String getName()
getName in interface BoundedPacketQueuepublic int size()
size in interface BoundedPacketQueuepublic boolean isStarted()
isStarted in interface BoundedPacketQueuepublic void stop()
stop in interface BoundedPacketQueuepublic void start()
start in interface BoundedPacketQueuepublic boolean isEmpty()
isEmpty in interface BoundedPacketQueuepublic void clear()
clear in interface BoundedPacketQueuepublic java.util.List getContents()
BoundedPacketQueue
getContents in interface BoundedPacketQueue
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||