|
|||||||||||
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(File dir,
String name)
Constructor for SpooledBoundedPacketQueue |
|
SpooledBoundedPacketQueue(File dir,
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 |
List |
getContents()
Retrieve a shallow copy of the contents as a list |
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(File dir, String name, long maxDataLength, int maxBlockSize) throws IOException
dir
- name
- maxDataLength
- maxBlockSize
-
IOException
public SpooledBoundedPacketQueue(File dir, String name) throws IOException
dir
- name
-
IOException
Method Detail |
public void enqueue(Packet packet) throws JMSException
enqueue
in interface BoundedPacketQueue
packet
-
JMSException
public void enqueueNoBlock(Packet packet) throws JMSException
enqueueNoBlock
in interface BoundedPacketQueue
packet
-
JMSException
public Packet dequeue() throws JMSException, InterruptedException
dequeue
in interface BoundedPacketQueue
JMSException
InterruptedException
public Packet dequeue(long timeInMillis) throws JMSException, InterruptedException
BoundedPacketQueue
dequeue
in interface BoundedPacketQueue
timeInMillis
- maximum time to wait to dequeue a Packet
JMSException
InterruptedException
public Packet dequeueNoWait() throws JMSException, InterruptedException
BoundedPacketQueue
dequeueNoWait
in interface BoundedPacketQueue
JMSException
InterruptedException
public boolean isFull()
public void close()
close
in interface BoundedPacketQueue
public String getName()
getName
in interface BoundedPacketQueue
public int size()
size
in interface BoundedPacketQueue
public boolean isStarted()
isStarted
in interface BoundedPacketQueue
public void stop()
stop
in interface BoundedPacketQueue
public void start()
start
in interface BoundedPacketQueue
public boolean isEmpty()
isEmpty
in interface BoundedPacketQueue
public void clear()
clear
in interface BoundedPacketQueue
public List getContents()
BoundedPacketQueue
getContents
in interface BoundedPacketQueue
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |