Top Description Methods
io.netty.util.internal.shaded.org.jctools.queues

public Interface QueueProgressIndicators

Known Direct Implementers
io.netty.util.internal.shaded.org.jctools.queues.atomic.AtomicReferenceArrayQueue, io.netty.util.internal.shaded.org.jctools.queues.atomic.BaseMpscLinkedAtomicArrayQueue, io.netty.util.internal.shaded.org.jctools.queues.atomic.BaseSpscLinkedAtomicArrayQueue, io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueue, io.netty.util.internal.shaded.org.jctools.queues.BaseSpscLinkedArrayQueue, io.netty.util.internal.shaded.org.jctools.queues.ConcurrentCircularArrayQueue, io.netty.util.internal.shaded.org.jctools.queues.MpscBlockingConsumerArrayQueue, io.netty.util.internal.shaded.org.jctools.queues.MpUnboundedXaddArrayQueue

This interface is provided for monitoring purposes only and is only available on queues where it is easy to provide it. The producer/consumer progress indicators usually correspond with the number of elements offered/polled, but they are not guaranteed to maintain that semantic.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the current value of the consumer progress index
currentConsumerIndex
()

This method has no concurrent visibility semantics.

public long

Returns:

the current value of the producer progress index
currentProducerIndex
()

This method has no concurrent visibility semantics.

Method Detail

currentConsumerIndexback to summary
public long currentConsumerIndex()

This method has no concurrent visibility semantics. The value returned may be negative. Under normal circumstances 2 consecutive calls to this method can offer an idea of progress made by consumer threads by subtracting the 2 results though in extreme cases (if consumers have progressed by more than 2^64) this may also fail.
This value will normally indicate number of elements taken out of the queue, but may under some circumstances be a derivative of that figure. This method should not be used to derive size or emptiness.

Returns:long

the current value of the consumer progress index

currentProducerIndexback to summary
public long currentProducerIndex()

This method has no concurrent visibility semantics. The value returned may be negative. Under normal circumstances 2 consecutive calls to this method can offer an idea of progress made by producer threads by subtracting the 2 results though in extreme cases (if producers have progressed by more than 2^64) this may also fail.
This value will normally indicate number of elements passed into the queue, but may under some circumstances be a derivative of that figure. This method should not be used to derive size or emptiness.

Returns:long

the current value of the producer progress index