org.multiverse.transactional.collections
Class AbstractBlockingQueue<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by org.multiverse.transactional.collections.AbstractBlockingQueue<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>, java.util.concurrent.BlockingQueue<E>, java.util.Queue<E>

public abstract class AbstractBlockingQueue<E>
extends java.util.AbstractQueue<E>
implements java.util.concurrent.BlockingQueue<E>


Constructor Summary
AbstractBlockingQueue()
           
 
Method Summary
protected abstract  void doAdd(E item)
           
protected abstract  E doRemove()
           
 int drainTo(java.util.Collection<? super E> c)
           
 int drainTo(java.util.Collection<? super E> c, int maxElements)
           
protected abstract  boolean isFull()
           
 boolean offer(E e)
           
 boolean offer(E e, long timeout, java.util.concurrent.TimeUnit unit)
           
 E poll()
           
 E poll(long timeout, java.util.concurrent.TimeUnit unit)
           
 void put(E e)
           
 E take()
           
 
Methods inherited from class java.util.AbstractQueue
add, addAll, clear, element, remove
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, remainingCapacity, remove
 
Methods inherited from interface java.util.Queue
element, peek, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

AbstractBlockingQueue

public AbstractBlockingQueue()
Method Detail

doRemove

protected abstract E doRemove()

doAdd

protected abstract void doAdd(E item)

isFull

protected abstract boolean isFull()

offer

public boolean offer(E e)
Specified by:
offer in interface java.util.concurrent.BlockingQueue<E>
Specified by:
offer in interface java.util.Queue<E>

put

public void put(E e)
         throws java.lang.InterruptedException
Specified by:
put in interface java.util.concurrent.BlockingQueue<E>
Throws:
java.lang.InterruptedException

offer

public boolean offer(E e,
                     long timeout,
                     java.util.concurrent.TimeUnit unit)
              throws java.lang.InterruptedException
Specified by:
offer in interface java.util.concurrent.BlockingQueue<E>
Throws:
java.lang.InterruptedException

take

public E take()
       throws java.lang.InterruptedException
Specified by:
take in interface java.util.concurrent.BlockingQueue<E>
Throws:
java.lang.InterruptedException

poll

public E poll(long timeout,
              java.util.concurrent.TimeUnit unit)
       throws java.lang.InterruptedException
Specified by:
poll in interface java.util.concurrent.BlockingQueue<E>
Throws:
java.lang.InterruptedException

drainTo

public int drainTo(java.util.Collection<? super E> c)
Specified by:
drainTo in interface java.util.concurrent.BlockingQueue<E>

drainTo

public int drainTo(java.util.Collection<? super E> c,
                   int maxElements)
Specified by:
drainTo in interface java.util.concurrent.BlockingQueue<E>

poll

public E poll()
Specified by:
poll in interface java.util.Queue<E>


Copyright © 2008-2010 Multiverse. All Rights Reserved.