public interface SequenceBarrier
EventProcessors for processing a data structure| Modifier and Type | Method and Description |
|---|---|
void |
alert()
Alert the
EventProcessors of a status change and stay in this status until cleared. |
void |
checkAlert()
Check if an alert has been raised and throw an
AlertException if it has. |
void |
clearAlert()
Clear the current alert status.
|
long |
getCursor()
Get the current cursor value that can be read.
|
boolean |
isAlerted()
The current alert status for the barrier.
|
long |
waitFor(long sequence)
Wait for the given sequence to be available for consumption.
|
long waitFor(long sequence)
throws AlertException,
java.lang.InterruptedException,
TimeoutException
sequence - to wait forAlertException - if a status change has occurred for the Disruptorjava.lang.InterruptedException - if the thread needs awaking on a condition variable.TimeoutException - if a timeout occurs while waiting for the supplied sequence.long getCursor()
boolean isAlerted()
void alert()
EventProcessors of a status change and stay in this status until cleared.void clearAlert()
void checkAlert()
throws AlertException
AlertException if it has.AlertException - if alert has been raised.Copyright © 2011 - 2018 LMAX Ltd. All Rights Reserved.