at.molindo.utils.concurrent
Class FactoryBlockingQueue<E>

java.lang.Object
  extended by at.molindo.utils.concurrent.FactoryBlockingQueue<E>
Type Parameters:
E -
All Implemented Interfaces:
Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>

Deprecated. Synchronization of this class is broken. Using synchronized(_queue) doesn't work (see FindBugs report)

@Deprecated
public abstract class FactoryBlockingQueue<E>
extends Object
implements BlockingQueue<E>

Author:
stf

Constructor Summary
FactoryBlockingQueue()
          Deprecated.  
 
Method Summary
 boolean add(E e)
          Deprecated.  
 boolean addAll(Collection<? extends E> c)
          Deprecated.  
 void clear()
          Deprecated.  
 boolean contains(Object o)
          Deprecated.  
 boolean containsAll(Collection<?> c)
          Deprecated.  
protected abstract  E create()
          Deprecated.  
 int drainTo(Collection<? super E> c)
          Deprecated.  
 int drainTo(Collection<? super E> c, int maxElements)
          Deprecated.  
 E element()
          Deprecated.  
 boolean isEmpty()
          Deprecated.  
 Iterator<E> iterator()
          Deprecated.  
 boolean offer(E e)
          Deprecated.  
 boolean offer(E e, long timeout, TimeUnit unit)
          Deprecated. blocks until timeout as this queue is always full by definition
 E peek()
          Deprecated.  
 E poll()
          Deprecated.  
 E poll(long timeout, TimeUnit unit)
          Deprecated.  
 void put(E e)
          Deprecated. WARNING: blocks indefinitely as this queue is always full by definition
 int remainingCapacity()
          Deprecated.  
 E remove()
          Deprecated.  
 boolean remove(Object o)
          Deprecated.  
 boolean removeAll(Collection<?> c)
          Deprecated.  
 boolean retainAll(Collection<?> c)
          Deprecated.  
 int size()
          Deprecated.  
 E take()
          Deprecated.  
 Object[] toArray()
          Deprecated.  
<T> T[]
toArray(T[] a)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

FactoryBlockingQueue

public FactoryBlockingQueue()
Deprecated. 
Method Detail

create

protected abstract E create()
Deprecated. 
Returns:
a new element, never null

remove

public E remove()
Deprecated. 
Specified by:
remove in interface Queue<E>

take

public E take()
       throws InterruptedException
Deprecated. 
Specified by:
take in interface BlockingQueue<E>
Throws:
InterruptedException

poll

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

poll

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

element

public E element()
Deprecated. 
Specified by:
element in interface Queue<E>

peek

public E peek()
Deprecated. 
Specified by:
peek in interface Queue<E>

addAll

public boolean addAll(Collection<? extends E> c)
Deprecated. 
Specified by:
addAll in interface Collection<E>
Returns:
always false

add

public boolean add(E e)
Deprecated. 
Specified by:
add in interface Collection<E>
Specified by:
add in interface BlockingQueue<E>
Specified by:
add in interface Queue<E>
Throws:
always - an IllegalStateException

offer

public boolean offer(E e)
Deprecated. 
Specified by:
offer in interface BlockingQueue<E>
Specified by:
offer in interface Queue<E>
Returns:
always false

put

public void put(E e)
         throws InterruptedException
Deprecated. 
WARNING: blocks indefinitely as this queue is always full by definition

Specified by:
put in interface BlockingQueue<E>
Throws:
InterruptedException

offer

public boolean offer(E e,
                     long timeout,
                     TimeUnit unit)
              throws InterruptedException
Deprecated. 
blocks until timeout as this queue is always full by definition

Specified by:
offer in interface BlockingQueue<E>
Throws:
InterruptedException

drainTo

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

drainTo

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

containsAll

public boolean containsAll(Collection<?> c)
Deprecated. 
Specified by:
containsAll in interface Collection<E>

removeAll

public boolean removeAll(Collection<?> c)
Deprecated. 
Specified by:
removeAll in interface Collection<E>

retainAll

public boolean retainAll(Collection<?> c)
Deprecated. 
Specified by:
retainAll in interface Collection<E>

remove

public boolean remove(Object o)
Deprecated. 
Specified by:
remove in interface Collection<E>
Specified by:
remove in interface BlockingQueue<E>

contains

public boolean contains(Object o)
Deprecated. 
Specified by:
contains in interface Collection<E>
Specified by:
contains in interface BlockingQueue<E>

clear

public void clear()
Deprecated. 
Specified by:
clear in interface Collection<E>

isEmpty

public boolean isEmpty()
Deprecated. 
Specified by:
isEmpty in interface Collection<E>

size

public int size()
Deprecated. 
Specified by:
size in interface Collection<E>

remainingCapacity

public int remainingCapacity()
Deprecated. 
Specified by:
remainingCapacity in interface BlockingQueue<E>

toArray

public Object[] toArray()
Deprecated. 
Specified by:
toArray in interface Collection<E>

toArray

public <T> T[] toArray(T[] a)
Deprecated. 
Specified by:
toArray in interface Collection<E>

iterator

public Iterator<E> iterator()
Deprecated. 
Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>


Copyright © 2011 Molindo GmbH. All Rights Reserved.