Package org.cometd.server.ext
Class BatchArrayQueue<T>
java.lang.Object
org.cometd.server.ext.BatchArrayQueue<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Queue<T>
public class BatchArrayQueue<T> extends Object implements Queue<T>
-
Constructor Summary
Constructors Constructor Description BatchArrayQueue(int initial, Object lock) -
Method Summary
Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> items)voidclear()voidclearToBatch(long batch)booleancontains(Object o)booleancontainsAll(Collection<?> items)Telement()voidexportMessagesToBatch(Queue<T> target, long batch)longgetBatch()booleanisEmpty()Iterator<T>iterator()voidnextBatch()booleanoffer(T t)Tpeek()Tpoll()Tremove()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<E> E[]toArray(E[] a)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
Method Details
-
offer
-
add
-
peek
-
element
-
poll
-
remove
-
remove
- Specified by:
removein interfaceCollection<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>
-
contains
- Specified by:
containsin interfaceCollection<T>
-
iterator
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>
-
size
public int size()- Specified by:
sizein interfaceCollection<T>
-
toArray
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
public <E> E[] toArray(E[] a)- Specified by:
toArrayin interfaceCollection<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>
-
getBatch
public long getBatch() -
nextBatch
public void nextBatch() -
clearToBatch
public void clearToBatch(long batch) -
exportMessagesToBatch
-