public interface PointerBarrier extends AutoCloseable
Pointerand that will
waitto advance it until it is safe to do so and there are entries available to read. This is used within the
RingBuffer.addConsumer(C)method to provide each consumer with a valid
Pointerthat stays as close as possible behind the ring buffer's
|Modifier and Type||Method and Description|
Signal that this barrier is closed and should return -1 from
Return whether this barrier has completed and should no longer be used.
Wait for the given position to be available for consumption.
long waitFor(long position) throws InterruptedException, TimeoutException
position- the sequence to wait for
InterruptedException- if the thread needs awaking on a condition variable.
TimeoutException- if this blocking method times out
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.