org.apache.axis2.transport.base.threads.watermark
Interface WaterMarkQueue<T>

Type Parameters:
T - The object
All Superinterfaces:
java.util.concurrent.BlockingQueue<T>, java.util.Collection<T>, java.lang.Iterable<T>, java.util.Queue<T>
All Known Implementing Classes:
DefaultWaterMarkQueue

public interface WaterMarkQueue<T>
extends java.util.concurrent.BlockingQueue<T>

This queue acts as a queue with a mark. The methods exposed by the BlockingQueue interface will add elements up to the mark. We call this mark the waterMark. After the water mark the all the insertion operations will fails as if the queue is bounded by this waterMark. After this to add values to the queue the offerAfter method should be called.


Method Summary
 boolean offerAfter(T object)
          Offer the element after the water mark.
 
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, drainTo, drainTo, offer, offer, poll, put, remainingCapacity, remove, take
 
Methods inherited from interface java.util.Queue
element, peek, poll, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 

Method Detail

offerAfter

boolean offerAfter(T object)
Offer the element after the water mark.

Parameters:
object - object to be inserted
Returns:
true if the insert is successful


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.