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 boolean
add(T item)
void
addAll(Iterable<T> iterable)
boolean
addAll(Collection<? extends T> c)
void
clear()
boolean
offer(T item)
T
peek()
T
poll()
boolean
remove(Object o)
int
size()
-
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:
addAll
in interfaceCollection<T>
- Specified by:
addAll
in interfaceDeque<T>
- Overrides:
addAll
in 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:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceDeque<T>
- Overrides:
remove
in classArrayDeque<T>
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceDeque<T>
- Overrides:
size
in classArrayDeque<T>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
- Overrides:
clear
in classArrayDeque<T>
-
-