AsyncQueue, which implements asynchronous write queue.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | AUTO_SIZE
Constant set via |
| public static final int | UNLIMITED_SIZE
Constant set via |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canWrite(final Connection<L>
the connection, int Connection to test whether or not the specified number of bytes can be written to.number of bytes to write. size)
Deprecated
the size parameter will be ignored, use
canWrite(org. instead.
Returns: |
| public int | getMaxPendingBytesPerConnection()
Returns: the maximum number of bytes that may be pending to be written to a particular |
| public boolean | 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.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 void | notifyWritePossible(final Connection<L> connection, final WriteHandler
WriteHandler to be notified.number of bytes queue has to be able to accept before notifying size)WriteHandler.
Deprecated
the size parameter will be ignored, use
{@link #notifyWritePossible(org.glassfish.grizzly.Connection, org.glassfish.grizzly.WriteHandler) instead.
Registers |
| public void | setAllowDirectWrite(final boolean
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. isAllowDirectWrite)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
maximum number of bytes that may be pending to be written to a particular maxQueuedWrites)Connection.Configures the maximum number of bytes pending to be written for a particular |
| public void | write(Connection<L>
the connection, L org. to write tothe destination address the dstAddress, WritableMessage WritableMessage will be sent tothe message, CompletionHandler<WriteResult<WritableMessage, L>> WritableMessage, from which the data will be writtenorg., which will get notified, when write will be
completedPushBackHandler, which will be notified if message was accepted by transport write
queue or refusedMessageCloner, which will be invoked by AsyncQueueWriter, if message could not be
written to a channel directly and has to be put on a asynchronous queue
Deprecated
push back logic is deprecated
Method writes the |
| AUTO_SIZE | back to summary |
|---|---|
| public static final int AUTO_SIZE Constant set via | |
| UNLIMITED_SIZE | back to summary |
|---|---|
| public static final int UNLIMITED_SIZE Constant set via | |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(final Connection<L> connection, int size)
Deprecated the size parameter will be ignored, use
| |
| getMaxPendingBytesPerConnection | back to summary |
|---|---|
public int getMaxPendingBytesPerConnection()
| |
| isAllowDirectWrite | back to summary |
|---|---|
| public boolean isAllowDirectWrite() 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.
| |
| notifyWritePossible | back to summary |
|---|---|
| public void notifyWritePossible(final Connection<L> connection, final WriteHandler writeHandler, final int size)
Deprecated the size parameter will be ignored, use {@link #notifyWritePossible(org.glassfish.grizzly.Connection, org.glassfish.grizzly.WriteHandler) instead. Registers Note using this method from different threads simultaneously may lead to quick situation changes, so at
time
| |
| setAllowDirectWrite | back to summary |
|---|---|
| public void setAllowDirectWrite(final boolean isAllowDirectWrite) 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 maxQueuedWrites) Configures the maximum number of bytes pending to be written for a particular
| |
| write | back to summary |
|---|---|
| public void write(Connection<L> connection, L dstAddress, WritableMessage message, CompletionHandler<WriteResult<WritableMessage, L>> completionHandler, PushBackHandler pushBackHandler, MessageCloner<WritableMessage> cloner)
Deprecated push back logic is deprecated Method writes the
| |