|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WaitStrategy
Strategy employed for making Consumer
s wait on a RingBuffer
.
Nested Class Summary | |
---|---|
static class |
WaitStrategy.BlockingStrategy
Blocking strategy that uses a lock and condition variable for Consumer s waiting on a barrier. |
static class |
WaitStrategy.BusySpinStrategy
Busy Spin strategy that uses a busy spin loop for Consumer s waiting on a barrier. |
static class |
WaitStrategy.Option
Strategy options which are available to those waiting on a RingBuffer |
static class |
WaitStrategy.YieldingStrategy
Yielding strategy that uses a Thread.yield() for Consumer s waiting on a barrier. |
Method Summary | |
---|---|
void |
signalAll()
Signal those waiting that the RingBuffer cursor has advanced. |
long |
waitFor(Consumer[] consumers,
RingBuffer ringBuffer,
ConsumerBarrier barrier,
long sequence)
Wait for the given sequence to be available for consumption in a RingBuffer |
long |
waitFor(Consumer[] consumers,
RingBuffer ringBuffer,
ConsumerBarrier barrier,
long sequence,
long timeout,
java.util.concurrent.TimeUnit units)
Wait for the given sequence to be available for consumption in a RingBuffer with a timeout specified. |
Method Detail |
---|
long waitFor(Consumer[] consumers, RingBuffer ringBuffer, ConsumerBarrier barrier, long sequence) throws AlertException, java.lang.InterruptedException
RingBuffer
consumers
- further back the chain that must advance firstringBuffer
- on which to wait.barrier
- the consumer is waiting on.sequence
- to be waited on.
AlertException
- if the status of the Disruptor has changed.
java.lang.InterruptedException
- if the thread is interrupted.long waitFor(Consumer[] consumers, RingBuffer ringBuffer, ConsumerBarrier barrier, long sequence, long timeout, java.util.concurrent.TimeUnit units) throws AlertException, java.lang.InterruptedException
RingBuffer
with a timeout specified.
consumers
- further back the chain that must advance firstringBuffer
- on which to wait.barrier
- the consumer is waiting on.sequence
- to be waited on.timeout
- value to abort after.units
- of the timeout value.
AlertException
- if the status of the Disruptor has changed.
java.lang.InterruptedException
- if the thread is interrupted.void signalAll()
RingBuffer
cursor has advanced.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |