org.eclipse.net4j.util.container.delegate
Class ContainerBlockingQueue<E>

java.lang.Object
  extended by org.eclipse.net4j.util.event.Notifier
      extended by org.eclipse.net4j.util.container.delegate.AbstractDelegator<E>
          extended by org.eclipse.net4j.util.container.delegate.ContainerCollection<E>
              extended by org.eclipse.net4j.util.container.delegate.ContainerQueue<E>
                  extended by org.eclipse.net4j.util.container.delegate.ContainerBlockingQueue<E>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>, java.util.concurrent.BlockingQueue<E>, java.util.Queue<E>, IContainerBlockingQueue<E>, IContainerCollection<E>, IContainerQueue<E>, IContainer<E>, INotifier, INotifier.Introspection

public class ContainerBlockingQueue<E>
extends ContainerQueue<E>
implements IContainerBlockingQueue<E>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.net4j.util.container.delegate.AbstractDelegator
AbstractDelegator.DelegatingIterator
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.Introspection
 
Constructor Summary
ContainerBlockingQueue(java.util.concurrent.BlockingQueue<E> delegate)
           
 
Method Summary
 int drainTo(java.util.Collection<? super E> c)
           
 int drainTo(java.util.Collection<? super E> c, int maxElements)
           
 java.util.concurrent.BlockingQueue<E> getDelegate()
           
 boolean offer(E o, long timeout, java.util.concurrent.TimeUnit unit)
           
 E poll(long timeout, java.util.concurrent.TimeUnit unit)
           
 void put(E o)
           
 int remainingCapacity()
           
 E take()
           
 
Methods inherited from class org.eclipse.net4j.util.container.delegate.ContainerQueue
element, offer, peek, poll, remove
 
Methods inherited from class org.eclipse.net4j.util.container.delegate.ContainerCollection
add, addAll, clear, contains, containsAll, equals, getElements, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class org.eclipse.net4j.util.container.delegate.AbstractDelegator
createEvent, dispatchEvent, fireAddedEvent, fireRemovedEvent
 
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, fireEvent, getListeners, hasListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.net4j.util.container.IContainer
getElements, isEmpty
 
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, removeListener
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.Queue
element, peek, poll, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.concurrent.BlockingQueue
add, offer
 
Methods inherited from interface java.util.Queue
element, peek, poll, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

ContainerBlockingQueue

public ContainerBlockingQueue(java.util.concurrent.BlockingQueue<E> delegate)
Method Detail

getDelegate

public java.util.concurrent.BlockingQueue<E> getDelegate()
Specified by:
getDelegate in interface IContainerBlockingQueue<E>
Specified by:
getDelegate in interface IContainerCollection<E>
Specified by:
getDelegate in interface IContainerQueue<E>
Overrides:
getDelegate in class ContainerQueue<E>

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>

offer

public boolean offer(E o,
                     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

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

put

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

remainingCapacity

public int remainingCapacity()
Specified by:
remainingCapacity in interface java.util.concurrent.BlockingQueue<E>

take

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

Copyright (c) 2004 - 2008 Eike Stepper, Germany.
All Rights Reserved.