AsyncQueueWriter implementation, based on the Java NIO
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private static final Logger | |
| protected volatile int | |
| protected volatile int | |
| protected final NIOTransport |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected AsyncWriteQueueRecord | aggregate(final TaskQueue<AsyncWriteQueueRecord> connectionQueue)
Aggregates records in a queue to be written as one chunk. |
| public boolean | canWrite(final Connection<SocketAddress> connection, final int size)
Implements org.
Deprecated
|
| public boolean | canWrite(final Connection<SocketAddress> connection)
Implements org. Return |
| private static WritableMessage | cloneRecordIfNeeded(final Connection<L> connection, final MessageCloner<WritableMessage> cloner, final WritableMessage message)
|
| public final void | close()
Implements org. Close AsyncQueueProcessor and release associated resources |
| protected AsyncWriteQueueRecord | createRecord(final Connection<L> connection, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final SocketAddress dstAddress, final PushBackHandler pushBackHandler, final boolean isUncountable)
References Deprecated
PushBackHandler is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private static void | |
| private static void | |
| public int | |
| public boolean | isAllowDirectWrite()
Implements org. Returns true, if async write queue is allowed to write buffer directly during write(...) method call, w/o adding buffer to the queue, or false otherwise. |
| public final boolean | isReady(final Connection<L> connection)
Implements org. Checks whether there is ready data in |
| public void | notifyWritePossible(final Connection<SocketAddress> connection, final WriteHandler writeHandler, final int size)
Implements org.
Deprecated
Registers |
| public void | notifyWritePossible(final Connection<SocketAddress> connection, final WriteHandler writeHandler)
Implements org. Registers |
| public void | onClose(final Connection<L> connection)
Implements org. Callback method, which is called, when |
| protected abstract void | |
| protected static void | onWriteFailure(final Connection<L> connection, final AsyncWriteQueueRecord failedRecord, final Throwable e)
|
| public AsyncQueue. | processAsync(final Context context)
Implements org. Callback method, which is called async. |
| public void | setAllowDirectWrite(final boolean isAllowDirectWrite)
Implements org. Set true, if async write queue is allowed to write buffer directly during write(...) method call, w/o adding buffer to the queue, or false otherwise. |
| public void | setMaxPendingBytesPerConnection(final int maxPendingBytes)
Implements org. Configures the maximum number of bytes pending to be written for a particular |
| public void | write(final Connection<SocketAddress> connection, final SocketAddress dstAddress, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final MessageCloner<WritableMessage> cloner)
Implements org. Method writes the |
| public void | write(final Connection<SocketAddress> connection, SocketAddress dstAddress, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final PushBackHandler pushBackHandler)
Implements org.
Deprecated
Method writes the |
| public void | write(final Connection<SocketAddress> connection, final SocketAddress dstAddress, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final PushBackHandler pushBackHandler, final MessageCloner<WritableMessage> cloner)
Implements org.
Deprecated
Method writes the |
| protected abstract RecordWriteResult |
| isAllowDirectWrite | back to summary |
|---|---|
| private volatile boolean isAllowDirectWrite | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| maxPendingBytes | back to summary |
|---|---|
| protected volatile int maxPendingBytes | |
| maxWriteReentrants | back to summary |
|---|---|
| protected volatile int maxWriteReentrants | |
| transport | back to summary |
|---|---|
| protected final NIOTransport transport | |
| AbstractNIOAsyncQueueWriter | back to summary |
|---|---|
| public AbstractNIOAsyncQueueWriter(NIOTransport transport) | |
| aggregate | back to summary |
|---|---|
| protected AsyncWriteQueueRecord aggregate(final TaskQueue<AsyncWriteQueueRecord> connectionQueue) Aggregates records in a queue to be written as one chunk. | |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(final Connection<SocketAddress> connection, final int size) Implements org. Deprecated
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(final Connection<SocketAddress> connection) Implements org. Doc from org. Return
| |
| cloneRecordIfNeeded | back to summary |
|---|---|
| private static WritableMessage cloneRecordIfNeeded(final Connection<L> connection, final MessageCloner<WritableMessage> cloner, final WritableMessage message) | |
| close | back to summary |
|---|---|
| public final void close() Implements org. Doc from org. Close AsyncQueueProcessor and release associated resources
| |
| createRecord | back to summary |
|---|---|
| protected AsyncWriteQueueRecord createRecord(final Connection<L> connection, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final SocketAddress dstAddress, final PushBackHandler pushBackHandler, final boolean isUncountable)
References Deprecated
See corresponding docs for further information. | |
| doFineLog | back to summary |
|---|---|
| private static void doFineLog(final String msg, final Object... params) | |
| finishQueueRecord | back to summary |
|---|---|
| private static void finishQueueRecord(final NIOConnection nioConnection, final AsyncWriteQueueRecord queueRecord) | |
| getMaxPendingBytesPerConnection | back to summary |
|---|---|
| public int getMaxPendingBytesPerConnection() Implements org.
| |
| isAllowDirectWrite | back to summary |
|---|---|
| public boolean isAllowDirectWrite() Implements org. Doc from org. Returns true, if async write queue is allowed to write buffer directly during write(...) method call, w/o adding buffer to the queue, or false otherwise.
| |
| isReady | back to summary |
|---|---|
| public final boolean isReady(final Connection<L> connection) Implements org. Doc from org. Checks whether there is ready data in
| |
| notifyWritePossible | back to summary |
|---|---|
| public void notifyWritePossible(final Connection<SocketAddress> connection, final WriteHandler writeHandler, final int size) Implements org. Doc from org. Deprecated
Registers Note using this method from different threads simultaneously may lead to quick situation changes, so at
time
| |
| notifyWritePossible | back to summary |
|---|---|
| public void notifyWritePossible(final Connection<SocketAddress> connection, final WriteHandler writeHandler) Implements org. Doc from org. Registers
| |
| onClose | back to summary |
|---|---|
| public void onClose(final Connection<L> connection) Implements org. Doc from org. Callback method, which is called, when
| |
| onReadyToWrite | back to summary |
|---|---|
| protected abstract void onReadyToWrite(NIOConnection connection) throws IOException | |
| onWriteFailure | back to summary |
|---|---|
| protected static void onWriteFailure(final Connection<L> connection, final AsyncWriteQueueRecord failedRecord, final Throwable e) | |
| processAsync | back to summary |
|---|---|
| public AsyncQueue. Implements org. Doc from org. Callback method, which is called async. to process ready
| |
| setAllowDirectWrite | back to summary |
|---|---|
| public void setAllowDirectWrite(final boolean isAllowDirectWrite) Implements org. Doc from org. Set true, if async write queue is allowed to write buffer directly during write(...) method call, w/o adding buffer to the queue, or false otherwise.
| |
| setMaxPendingBytesPerConnection | back to summary |
|---|---|
| public void setMaxPendingBytesPerConnection(final int maxPendingBytes) Implements org. Doc from org. Configures the maximum number of bytes pending to be written for a particular
| |
| write | back to summary |
|---|---|
| public void write(final Connection<SocketAddress> connection, final SocketAddress dstAddress, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final MessageCloner<WritableMessage> cloner) Implements org. Doc from org. Method writes the
| |
| write | back to summary |
|---|---|
| public void write(final Connection<SocketAddress> connection, SocketAddress dstAddress, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final PushBackHandler pushBackHandler) Implements org. Doc from org. Deprecated
Method writes the
| |
| write | back to summary |
|---|---|
| public void write(final Connection<SocketAddress> connection, final SocketAddress dstAddress, final WritableMessage message, final CompletionHandler<WriteResult<WritableMessage, SocketAddress>> completionHandler, final PushBackHandler pushBackHandler, final MessageCloner<WritableMessage> cloner) Implements org. Doc from org. Deprecated
Method writes the
| |
| write0 | back to summary |
|---|---|
| protected abstract RecordWriteResult | |