AsyncQueueReader implementation, based on the Java NIO
| Modifier and Type | Field and Description |
|---|---|
| private EOFException | |
| public static final int | |
| protected int | |
| private static final Logger | |
| protected final NIOTransport |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | close()
Implements org. Close AsyncQueueProcessor and release associated resources |
| protected final int | doRead(final Connection<L>
the connection, final AsyncReadQueueRecord Connection to read fromthe record to be read to queueRecord)Performs real read on the NIO channel |
| private static void | failure(final Throwable failure, final CompletionHandler<ReadResult<Buffer, SocketAddress>> completionHandler)
|
| private int | intercept(final int event, final AsyncReadQueueRecord asyncQueueRecord, final ReadResult<K, L> currentResult)
|
| public final boolean | isReady(final Connection<L> connection)
Implements org. Checks whether there is ready data in |
| public void | onClose(Connection<L> connection)
Implements org. Callback method, which is called, when |
| protected final void | onReadFailure(final Connection<L> connection, final AsyncReadQueueRecord failedRecord, final IOException e)
|
| protected abstract void | |
| public AsyncQueue. | processAsync(final Context context)
Implements org. Callback method, which is called async. |
| public void | read(final Connection<SocketAddress> connection, Buffer buffer, final CompletionHandler<ReadResult<Buffer, SocketAddress>> completionHandler, final Interceptor<ReadResult<K, L>> interceptor)
Implements org. Method reads data to the buffer. |
| protected abstract int |
| cachedEOFException | back to summary |
|---|---|
| private EOFException cachedEOFException | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_BUFFER_SIZE | |
| defaultBufferSize | back to summary |
|---|---|
| protected int defaultBufferSize | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| transport | back to summary |
|---|---|
| protected final NIOTransport transport | |
| AbstractNIOAsyncQueueReader | back to summary |
|---|---|
| public AbstractNIOAsyncQueueReader(NIOTransport transport) | |
| close | back to summary |
|---|---|
| public final void close() Implements org. Doc from org. Close AsyncQueueProcessor and release associated resources
| |
| doRead | back to summary |
|---|---|
| protected final int doRead(final Connection<L> connection, final AsyncReadQueueRecord queueRecord) throws IOException Performs real read on the NIO channel
| |
| failure | back to summary |
|---|---|
| private static void failure(final Throwable failure, final CompletionHandler<ReadResult<Buffer, SocketAddress>> completionHandler) | |
| intercept | back to summary |
|---|---|
| private int intercept(final int event, final AsyncReadQueueRecord asyncQueueRecord, final ReadResult<K, L> currentResult) | |
| isReady | back to summary |
|---|---|
| public final boolean isReady(final Connection<L> connection) Implements org. Doc from org. Checks whether there is ready data in
| |
| onClose | back to summary |
|---|---|
| public void onClose(Connection<L> connection) Implements org. Doc from org. Callback method, which is called, when
| |
| onReadFailure | back to summary |
|---|---|
| protected final void onReadFailure(final Connection<L> connection, final AsyncReadQueueRecord failedRecord, final IOException e) | |
| onReadyToRead | back to summary |
|---|---|
| protected abstract void onReadyToRead(Connection<L> connection) throws IOException | |
| processAsync | back to summary |
|---|---|
| public AsyncQueue. Implements org. Doc from org. Callback method, which is called async. to process ready
| |
| read | back to summary |
|---|---|
| public void read(final Connection<SocketAddress> connection, Buffer buffer, final CompletionHandler<ReadResult<Buffer, SocketAddress>> completionHandler, final Interceptor<ReadResult<K, L>> interceptor) Implements org. Doc from org. Method reads data to the buffer.
| |
| read0 | back to summary |
|---|---|
| protected abstract int read0(Connection<L> connection, Buffer buffer, ReadResult<Buffer, SocketAddress> currentResult) throws IOException | |