Class TCPNIOAsyncQueueWriter
- java.lang.Object
-
- org.glassfish.grizzly.AbstractWriter<SocketAddress>
-
- org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter
-
- org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter
-
- All Implemented Interfaces:
AsyncQueue
,AsyncQueueWriter<SocketAddress>
,Writer<SocketAddress>
public final class TCPNIOAsyncQueueWriter extends AbstractNIOAsyncQueueWriter
The TCP transportAsyncQueueWriter
implementation, based on the Java NIO- Author:
- Alexey Stashok
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.grizzly.asyncqueue.AsyncQueue
AsyncQueue.AsyncResult
-
Nested classes/interfaces inherited from interface org.glassfish.grizzly.Writer
Writer.Reentrant
-
-
Field Summary
-
Fields inherited from class org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter
maxPendingBytes, maxWriteReentrants, transport
-
Fields inherited from interface org.glassfish.grizzly.asyncqueue.AsyncQueue
EXPECTING_MORE_OPTION
-
Fields inherited from interface org.glassfish.grizzly.asyncqueue.AsyncQueueWriter
AUTO_SIZE, UNLIMITED_SIZE
-
-
Constructor Summary
Constructors Constructor Description TCPNIOAsyncQueueWriter(NIOTransport transport)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AsyncWriteQueueRecord
aggregate(TaskQueue<AsyncWriteQueueRecord> writeTaskQueue)
Aggregates records in a queue to be written as one chunk.protected void
onReadyToWrite(NIOConnection connection)
protected RecordWriteResult
write0(NIOConnection connection, AsyncWriteQueueRecord queueRecord)
protected long
write0(NIOConnection connection, WritableMessage message, WriteResult<WritableMessage,SocketAddress> currentResult)
-
Methods inherited from class org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter
canWrite, canWrite, close, createRecord, getMaxPendingBytesPerConnection, isAllowDirectWrite, isReady, notifyWritePossible, notifyWritePossible, onClose, onWriteFailure, processAsync, setAllowDirectWrite, setMaxPendingBytesPerConnection, write, write, write
-
Methods inherited from class org.glassfish.grizzly.AbstractWriter
write, write, write, write
-
-
-
-
Constructor Detail
-
TCPNIOAsyncQueueWriter
public TCPNIOAsyncQueueWriter(NIOTransport transport)
-
-
Method Detail
-
write0
protected RecordWriteResult write0(NIOConnection connection, AsyncWriteQueueRecord queueRecord) throws IOException
- Specified by:
write0
in classAbstractNIOAsyncQueueWriter
- Throws:
IOException
-
write0
protected long write0(NIOConnection connection, WritableMessage message, WriteResult<WritableMessage,SocketAddress> currentResult) throws IOException
- Throws:
IOException
-
onReadyToWrite
protected void onReadyToWrite(NIOConnection connection) throws IOException
- Specified by:
onReadyToWrite
in classAbstractNIOAsyncQueueWriter
- Throws:
IOException
-
aggregate
protected AsyncWriteQueueRecord aggregate(TaskQueue<AsyncWriteQueueRecord> writeTaskQueue)
Aggregates records in a queue to be written as one chunk.- Overrides:
aggregate
in classAbstractNIOAsyncQueueWriter
-
-