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
All Methods Instance Methods Concrete Methods 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 Detail
-
BatchArrayQueue
public BatchArrayQueue(int initial, Object lock)
-
-
Method Detail
-
add
public boolean add(T t)
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> items)
- Specified by:
addAll
in interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<T>
-
containsAll
public boolean containsAll(Collection<?> items)
- Specified by:
containsAll
in interfaceCollection<T>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
-
toArray
public Object[] 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)
-
-