org.glassfish.grizzly.nio.transport
Class TCPNIOAsyncQueueWriter
java.lang.Object
org.glassfish.grizzly.AbstractWriter<java.net.SocketAddress>
org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter
org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter
- All Implemented Interfaces:
- AsyncQueue, AsyncQueueWriter<java.net.SocketAddress>, Writer<java.net.SocketAddress>
public final class TCPNIOAsyncQueueWriter
- extends AbstractNIOAsyncQueueWriter
The TCP transport AsyncQueueWriter implementation, based on
the Java NIO
- Author:
- Alexey Stashok
| Methods inherited from class org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter |
canWrite, close, createRecord, getMaxPendingBytesPerConnection, getMaxWriteReentrants, getWriteReentrant, isAllowDirectWrite, isMaxReentrantsReached, isReady, notifyWritePossible, onClose, onWriteFailure, processAsync, setAllowDirectWrite, setMaxPendingBytesPerConnection, setMaxWriteReentrants, write, write, writeQueueRecord |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPNIOAsyncQueueWriter
public TCPNIOAsyncQueueWriter(NIOTransport transport)
write0
protected long write0(NIOConnection connection,
AsyncWriteQueueRecord queueRecord)
throws java.io.IOException
- Specified by:
write0 in class AbstractNIOAsyncQueueWriter
- Throws:
java.io.IOException
onReadyToWrite
protected final void onReadyToWrite(NIOConnection connection)
throws java.io.IOException
- Specified by:
onReadyToWrite in class AbstractNIOAsyncQueueWriter
- Throws:
java.io.IOException
aggregate
protected AsyncWriteQueueRecord aggregate(TaskQueue<AsyncWriteQueueRecord> writeTaskQueue)
- Aggregates records in a queue to be written as one chunk.
- Overrides:
aggregate in class AbstractNIOAsyncQueueWriter
offerToTaskQueue
protected static void offerToTaskQueue(NIOConnection nioConnection,
AsyncWriteQueueRecord queueRecord,
TaskQueue<AsyncWriteQueueRecord> taskQueue)
Copyright © 2012 Oracle Corporation. All Rights Reserved.