Package io.camunda.zeebe.scheduler
Class BoundedArrayQueue<P>
java.lang.Object
io.camunda.zeebe.scheduler.BoundedArrayQueue<P>
- All Implemented Interfaces:
Iterable<P>,Collection<P>,Queue<P>
Non concurrent, garbage-free array queue with fixed capacity.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends P> c) voidclear()booleanbooleancontainsAll(Collection<?> c) element()intbooleanisEmpty()iterator()booleanpeek()poll()remove()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] 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
-
Field Details
-
array
-
capacity
protected final int capacity -
mask
protected final int mask -
head
protected long head -
tail
protected long tail -
iterator
protected final BoundedArrayQueue<P>.io.camunda.zeebe.scheduler.BoundedArrayQueue.BoundedArrayQueueIterator<P> iterator
-
-
Constructor Details
-
BoundedArrayQueue
public BoundedArrayQueue(int capacity)
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<P>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<P>
-
contains
- Specified by:
containsin interfaceCollection<P>
-
toArray
- Specified by:
toArrayin interfaceCollection<P>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<P>
-
remove
- Specified by:
removein interfaceCollection<P>
-
containsAll
- Specified by:
containsAllin interfaceCollection<P>
-
addAll
- Specified by:
addAllin interfaceCollection<P>
-
removeAll
- Specified by:
removeAllin interfaceCollection<P>
-
retainAll
- Specified by:
retainAllin interfaceCollection<P>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<P>
-
getCapacity
public int getCapacity() -
iterator
-
add
-
offer
-
remove
-
poll
-
element
-
peek
-