Package com.metsci.glimpse.dnc.util
Class SingletonEvictingBlockingQueue<V>
- java.lang.Object
-
- com.metsci.glimpse.dnc.util.SingletonEvictingBlockingQueue<V>
-
- All Implemented Interfaces:
Iterable<V>,Collection<V>,BlockingQueue<V>,Queue<V>
public class SingletonEvictingBlockingQueue<V> extends Object implements BlockingQueue<V>
-
-
Constructor Summary
Constructors Constructor Description SingletonEvictingBlockingQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(V v)booleanaddAll(Collection<? extends V> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)intdrainTo(Collection<? super V> c)intdrainTo(Collection<? super V> c, int maxElements)Velement()booleanisEmpty()Iterator<V>iterator()booleanoffer(V v)booleanoffer(V v, long timeout, TimeUnit unit)Vpeek()Vpoll()Vpoll(long timeout, TimeUnit unit)voidput(V v)intremainingCapacity()Vremove()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Vtake()Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Method Detail
-
add
public boolean add(V v)
- Specified by:
addin interfaceBlockingQueue<V>- Specified by:
addin interfaceCollection<V>- Specified by:
addin interfaceQueue<V>
-
addAll
public boolean addAll(Collection<? extends V> c)
- Specified by:
addAllin interfaceCollection<V>
-
offer
public boolean offer(V v)
-
offer
public boolean offer(V v, long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
offerin interfaceBlockingQueue<V>- Throws:
InterruptedException
-
put
public void put(V v) throws InterruptedException
- Specified by:
putin interfaceBlockingQueue<V>- Throws:
InterruptedException
-
poll
public V poll(long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
pollin interfaceBlockingQueue<V>- Throws:
InterruptedException
-
take
public V take() throws InterruptedException
- Specified by:
takein interfaceBlockingQueue<V>- Throws:
InterruptedException
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<V>
-
size
public int size()
- Specified by:
sizein interfaceCollection<V>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<V>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<V>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<V>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceBlockingQueue<V>- Specified by:
containsin interfaceCollection<V>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<V>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceBlockingQueue<V>- Specified by:
removein interfaceCollection<V>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<V>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<V>
-
remainingCapacity
public int remainingCapacity()
- Specified by:
remainingCapacityin interfaceBlockingQueue<V>
-
drainTo
public int drainTo(Collection<? super V> c)
- Specified by:
drainToin interfaceBlockingQueue<V>
-
drainTo
public int drainTo(Collection<? super V> c, int maxElements)
- Specified by:
drainToin interfaceBlockingQueue<V>
-
-