Class RecordQueue<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.ArrayDeque<T>
-
- io.smallrye.reactive.messaging.kafka.impl.RecordQueue<T>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,Deque<T>,Queue<T>
public class RecordQueue<T> extends ArrayDeque<T>
Stores the records coming from Kafka. Only a few operations are supported:offer(Object),addAll(Iterable),clear(),size()andpoll().The access is guarded by the monitor lock.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RecordQueue(int capacityHint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T item)voidaddAll(Iterable<T> iterable)booleanaddAll(Collection<? extends T> c)voidclear()booleanoffer(T item)Tpeek()Tpoll()booleanremove(Object o)intsize()-
Methods inherited from class java.util.ArrayDeque
addFirst, addLast, clone, contains, descendingIterator, element, forEach, getFirst, getLast, isEmpty, iterator, offerFirst, offerLast, peekFirst, peekLast, pollFirst, pollLast, pop, push, remove, removeAll, removeFirst, removeFirstOccurrence, removeIf, removeLast, removeLastOccurrence, retainAll, spliterator, toArray, toArray
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
containsAll, equals, hashCode, parallelStream, stream, toArray
-
-
-
-
Method Detail
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceDeque<T>- Overrides:
addAllin classArrayDeque<T>
-
add
public boolean add(T item)
-
offer
public boolean offer(T item)
-
poll
public T poll()
-
peek
public T peek()
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>- Specified by:
removein interfaceDeque<T>- Overrides:
removein classArrayDeque<T>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceDeque<T>- Overrides:
sizein classArrayDeque<T>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>- Overrides:
clearin classArrayDeque<T>
-
-