public class AsyncRingBufferWatcher<TRingBuffer extends RingBuffer> extends AsyncAgent
RingBuffer.
 Fires the given callback when there are items available for reading.WhenReady, 
AsyncAgent, 
RingBuffer| Constructor and Description | 
|---|
| AsyncRingBufferWatcher(TRingBuffer ringBuffer,
                      java.util.function.Consumer<TRingBuffer> onAvailableToRead,
                      AsyncOptions asyncOptions)Constructs an AsyncCharDecoder instance over the given ring buffers. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | action()"action" function that invokes the onAvailableToRead callback synchronously. | 
| protected boolean | done()"done" predicate that returns true when this async agent wants to quit the current async loop. | 
| TRingBuffer | getRingBuffer()Returns the watched ring buffer. | 
| boolean | isEOF()Checks whether this watcher has reached EOF of the watched ring buffer. | 
| protected boolean | ready()"ready" predicate that returns true when items can be read from the watched ring buffer. | 
applyAsync, isIdle, setIdle, setIdleAndThrow, startApplyLoopAsyncpublic AsyncRingBufferWatcher(TRingBuffer ringBuffer, java.util.function.Consumer<TRingBuffer> onAvailableToRead, AsyncOptions asyncOptions)
ringBuffer - RingBuffer to watch.onAvailableToRead - A callback to invoke when there are items available to read from the ring buffer.asyncOptions - AsyncOptions to use for all async operations.public TRingBuffer getRingBuffer()
public boolean isEOF()
protected boolean ready()
ready in class AsyncAgentAsyncAgent.action().protected boolean done()
done in class AsyncAgentprotected void action()
action in class AsyncAgent