org.xmlBlaster.util.queue
Class BlockingQueueWrapper
java.lang.Object
org.xmlBlaster.util.queue.BlockingQueueWrapper
- All Implemented Interfaces:
- I_StorageSizeListener
public class BlockingQueueWrapper
- extends java.lang.Object
- implements I_StorageSizeListener
BlockingQueueWrapper is a wrapper to I_Queue which can be used to perform a
blocking peek on an I_Queue.
- Author:
- Michele Laghi
Method Summary |
java.util.List<I_Entry> |
blockingPeek(int numOfEntries,
long timeout)
|
java.util.List<I_Entry> |
blockingPeekLowest(int numOfEntries,
long timeout,
I_QueueEntry limitEntry)
|
java.util.List<I_Entry> |
blockingPeekSamePriority(int numOfEntries,
long timeout)
|
java.util.List<I_Entry> |
blockingPeekWithPriority(int numOfEntries,
long timeout,
int minPrio,
int maxPrio)
|
java.util.List<I_Entry> |
blockingTakeLowest(int numOfEntries,
long timeout,
I_QueueEntry limitEntry)
|
java.util.List<I_Entry> |
blockingTakeWithPriority(int numOfEntries,
long timeout,
int minPrio,
int maxPrio)
|
void |
changed(I_Storage storage,
long numEntries,
long numBytes,
boolean isShutdown)
Enforced by I_StorageSizeListener. |
void |
clear()
|
I_Queue |
getQueue()
|
void |
init(I_Queue queue_)
|
void |
shutdown()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlockingQueueWrapper
public BlockingQueueWrapper(long pollInterval)
- Constructor
- Parameters:
pollInterval
- time in milliseconds to wait before a check about the
queue size is done.
BlockingQueueWrapper
public BlockingQueueWrapper()
init
public void init(I_Queue queue_)
throws XmlBlasterException
- Throws:
XmlBlasterException
clear
public void clear()
getQueue
public I_Queue getQueue()
- Returns:
- null after shutdown
shutdown
public void shutdown()
changed
public void changed(I_Storage storage,
long numEntries,
long numBytes,
boolean isShutdown)
- Enforced by I_StorageSizeListener.
- Specified by:
changed
in interface I_StorageSizeListener
- Parameters:
queue
- numEntries
- numBytes
- isShutdown
-
blockingPeek
public java.util.List<I_Entry> blockingPeek(int numOfEntries,
long timeout)
throws XmlBlasterException
- Throws:
XmlBlasterException
blockingTakeLowest
public java.util.List<I_Entry> blockingTakeLowest(int numOfEntries,
long timeout,
I_QueueEntry limitEntry)
throws XmlBlasterException
- Throws:
XmlBlasterException
blockingPeekLowest
public java.util.List<I_Entry> blockingPeekLowest(int numOfEntries,
long timeout,
I_QueueEntry limitEntry)
throws XmlBlasterException
- Throws:
XmlBlasterException
blockingTakeWithPriority
public java.util.List<I_Entry> blockingTakeWithPriority(int numOfEntries,
long timeout,
int minPrio,
int maxPrio)
throws XmlBlasterException
- Throws:
XmlBlasterException
blockingPeekWithPriority
public java.util.List<I_Entry> blockingPeekWithPriority(int numOfEntries,
long timeout,
int minPrio,
int maxPrio)
throws XmlBlasterException
- Throws:
XmlBlasterException
blockingPeekSamePriority
public java.util.List<I_Entry> blockingPeekSamePriority(int numOfEntries,
long timeout)
throws XmlBlasterException
- Throws:
XmlBlasterException
Copyright © 1999-2014 The xmlBlaster.org contributers.