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 boolean
add(T t)
boolean
addAll(Collection<? extends T> items)
void
clear()
void
clearToBatch(long batch)
boolean
contains(Object o)
boolean
containsAll(Collection<?> items)
T
element()
void
exportMessagesToBatch(Queue<T> target, long batch)
long
getBatch()
boolean
isEmpty()
Iterator<T>
iterator()
void
nextBatch()
boolean
offer(T t)
T
peek()
T
poll()
T
remove()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
int
size()
Object[]
toArray()
<E> E[]
toArray(E[] a)
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, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
Method Details
-
offer
-
add
-
peek
-
element
-
poll
-
remove
-
remove
- Specified by:
remove
in interfaceCollection<T>
-
addAll
- Specified by:
addAll
in interfaceCollection<T>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<T>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<T>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
-
contains
- Specified by:
contains
in interfaceCollection<T>
-
iterator
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<T>
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
-
toArray
- Specified by:
toArray
in interfaceCollection<T>
-
toArray
public <E> E[] toArray(E[] a)- Specified by:
toArray
in interfaceCollection<T>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<T>
-
getBatch
public long getBatch() -
nextBatch
public void nextBatch() -
clearToBatch
public void clearToBatch(long batch) -
exportMessagesToBatch
-