E
- type of the elements stored in the Queue
.public class ManyToOneConcurrentArrayQueue<E> extends AbstractConcurrentArrayQueue<E>
Unsafe
.Modifier and Type | Field and Description |
---|---|
protected long |
head |
protected long |
headCache |
protected long |
p1 |
protected long |
p10 |
protected long |
p11 |
protected long |
p12 |
protected long |
p13 |
protected long |
p14 |
protected long |
p15 |
protected long |
p16 |
protected long |
p17 |
protected long |
p18 |
protected long |
p19 |
protected long |
p2 |
protected long |
p20 |
protected long |
p21 |
protected long |
p22 |
protected long |
p23 |
protected long |
p24 |
protected long |
p25 |
protected long |
p26 |
protected long |
p27 |
protected long |
p28 |
protected long |
p29 |
protected long |
p3 |
protected long |
p30 |
protected long |
p31 |
protected long |
p32 |
protected long |
p33 |
protected long |
p34 |
protected long |
p35 |
protected long |
p36 |
protected long |
p37 |
protected long |
p38 |
protected long |
p39 |
protected long |
p4 |
protected long |
p40 |
protected long |
p41 |
protected long |
p42 |
protected long |
p43 |
protected long |
p44 |
protected long |
p45 |
protected long |
p5 |
protected long |
p6 |
protected long |
p7 |
protected long |
p8 |
protected long |
p9 |
protected long |
sharedHeadCache |
protected long |
tail |
buffer, BUFFER_ARRAY_BASE, capacity, HEAD_OFFSET, SHARED_HEAD_CACHE_OFFSET, SHIFT_FOR_SCALE, TAIL_OFFSET
Constructor and Description |
---|
ManyToOneConcurrentArrayQueue(int requestedCapacity) |
Modifier and Type | Method and Description |
---|---|
int |
drain(java.util.function.Consumer<E> elementConsumer)
Drain the number of elements present in a collection at the time the operation starts.
|
int |
drain(java.util.function.Consumer<E> elementConsumer,
int limit)
Drain the minimum of a limit and the number of elements present in a collection at the time the operation starts.
|
int |
drainTo(java.util.Collection<? super E> target,
int limit)
Drain available elements into the provided
Collection up to a provided maximum limit of
elements. |
boolean |
offer(E e) |
E |
poll() |
add, addAll, addedCount, capacity, clear, contains, containsAll, element, isEmpty, iterator, peek, remainingCapacity, remove, remove, removeAll, removedCount, retainAll, sequenceToBufferOffset, size, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected long p31
protected long p32
protected long p33
protected long p34
protected long p35
protected long p36
protected long p37
protected long p38
protected long p39
protected long p40
protected long p41
protected long p42
protected long p43
protected long p44
protected long p45
protected volatile long head
protected long p16
protected long p17
protected long p18
protected long p19
protected long p20
protected long p21
protected long p22
protected long p23
protected long p24
protected long p25
protected long p26
protected long p27
protected long p28
protected long p29
protected long p30
protected volatile long tail
protected long headCache
protected volatile long sharedHeadCache
protected long p1
protected long p2
protected long p3
protected long p4
protected long p5
protected long p6
protected long p7
protected long p8
protected long p9
protected long p10
protected long p11
protected long p12
protected long p13
protected long p14
protected long p15
public ManyToOneConcurrentArrayQueue(int requestedCapacity)
public boolean offer(E e)
public E poll()
public int drain(java.util.function.Consumer<E> elementConsumer)
Pipe
If possible, implementations should use smart batching to best handle burst traffic.
elementConsumer
- Consumer
for processing elementspublic int drain(java.util.function.Consumer<E> elementConsumer, int limit)
Pipe
If possible, implementations should use smart batching to best handle burst traffic.
elementConsumer
- Consumer
for processing elementslimit
- maximum number of elements to be drained in a drain operation.public int drainTo(java.util.Collection<? super E> target, int limit)
Pipe
Collection
up to a provided maximum limit of
elements.
If possible, implementations should use smart batching to best handle burst traffic.
target
- in to which elements are drained.limit
- maximum number of elements to be drained in a drain operation.Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.