When a write takes place all frames are attempted to be written out at once via a gathering write. Frames can be
queued via queueFrame(io..
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static interface | AbstractFramedStreamSinkConduit.
Interface that is called when a frame event takes place. |
| protected static class | |
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| private int | bufferCount
The total number of buffers that have been queued to be written out |
| private static final int | |
| private static final int | |
| private final Deque | |
| private long | queuedData
The total amount of data that has been queued to be written out |
| private int |
| Access | Constructor and Description |
|---|---|
| protected | AbstractFramedStreamSinkConduit(StreamSinkConduit
the delegate conduit to set next)Construct a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| private long | |
| protected void | |
| protected boolean | |
| protected boolean | |
| protected void | |
| protected long | |
| protected void | queueFrame(AbstractFramedStreamSinkConduit.
Queues a frame for sending. |
| public void | terminateWrites()
Overrides org. Implements org. Signal that no more write data is forthcoming. |
| public long | transferFrom(final FileChannel
the file to read from src, final long the position within the file from which the transfer is to begin position, final long the number of bytes to be transferred count)Overrides org. Implements org. Transfer bytes into this conduit from the given file. |
| public long | transferFrom(final StreamSourceChannel
the source to read from source, final long the number of bytes to be transferred count, final ByteBuffer the buffer to copy through. throughBuffer)Overrides org. Implements org. Transfers bytes from the given channel source. |
| public void | truncateWrites()
Overrides org. Implements org. Terminate writes and discard any outstanding write data. |
| public int | write(ByteBuffer
the buffer containing data to write src)Overrides org. Implements org. Writes a sequence of bytes to this conduit from the given buffer. |
| public long | write(ByteBuffer[]
the buffers containing data to write srcs, int the offset into the buffer array offs, int the number of buffers to write len)Overrides org. Implements org. Writes a sequence of bytes to this conduit from the given buffers. |
| public int | writeFinal(ByteBuffer
The data to write src)Overrides org. Implements org. Writes some data to the conduit, with the same semantics as
|
| public long | writeFinal(ByteBuffer[]
The buffers from which bytes are to be retrieved srcs, int The offset within the buffer array of the first buffer from
which bytes are to be retrieved; must be non-negative and no
larger than srcs.length offs, int The maximum number of buffers to be accessed; must be
non-negative and no larger than
srcs.length - offset len)Overrides org. Implements org. Writes some data to the conduit, with the same semantics as
|
| bufferCount | back to summary |
|---|---|
| private int bufferCount The total number of buffers that have been queued to be written out | |
| FLAG_DELEGATE_SHUTDOWN | back to summary |
|---|---|
| private static final int FLAG_DELEGATE_SHUTDOWN | |
| FLAG_WRITES_TERMINATED | back to summary |
|---|---|
| private static final int FLAG_WRITES_TERMINATED | |
| frameQueue | back to summary |
|---|---|
| private final Deque<AbstractFramedStreamSinkConduit. | |
| queuedData | back to summary |
|---|---|
| private long queuedData The total amount of data that has been queued to be written out | |
| state | back to summary |
|---|---|
| private int state | |
| AbstractFramedStreamSinkConduit | back to summary |
|---|---|
| protected AbstractFramedStreamSinkConduit(StreamSinkConduit next) Construct a new instance.
| |
| doTerminateWrites | back to summary |
|---|---|
| protected void doTerminateWrites() throws IOException | |
| doWrite | back to summary |
|---|---|
| private long doWrite(ByteBuffer[] additionalData, int offs, int len) throws IOException | |
| finished | back to summary |
|---|---|
| protected void finished() | |
| flushQueuedData | back to summary |
|---|---|
| protected boolean flushQueuedData() throws IOException | |
| isWritesTerminated | back to summary |
|---|---|
| protected boolean isWritesTerminated() | |
| queueCloseFrames | back to summary |
|---|---|
| protected void queueCloseFrames() | |
| queuedDataLength | back to summary |
|---|---|
| protected long queuedDataLength() | |
| queueFrame | back to summary |
|---|---|
| protected void queueFrame(AbstractFramedStreamSinkConduit. Queues a frame for sending. | |
| terminateWrites | back to summary |
|---|---|
| public void terminateWrites() throws IOException Overrides org. Implements org. Doc from org. Signal that no more write data is forthcoming. The conduit must be
| |
| transferFrom | back to summary |
|---|---|
| public long transferFrom(final FileChannel src, final long position, final long count) throws IOException Overrides org. Implements org. Doc from org. Transfer bytes into this conduit from the given file.
| |
| transferFrom | back to summary |
|---|---|
| public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException Overrides org. Implements org. Doc from org. Transfers bytes from the given channel source. On entry,
| |
| truncateWrites | back to summary |
|---|---|
| public void truncateWrites() throws IOException Overrides org. Implements org. Doc from org. Terminate writes and discard any outstanding write data. The conduit is terminated and flushed regardless of the outcome of this method.
| |
| write | back to summary |
|---|---|
| public int write(ByteBuffer src) throws IOException Overrides org. Implements org. Doc from org. Writes a sequence of bytes to this conduit from the given buffer.
| |
| write | back to summary |
|---|---|
| public long write(ByteBuffer[] srcs, int offs, int len) throws IOException Overrides org. Implements org. Doc from org. Writes a sequence of bytes to this conduit from the given buffers.
| |
| writeFinal | back to summary |
|---|---|
| public int writeFinal(ByteBuffer src) throws IOException Overrides org. Implements org. Doc from org. Writes some data to the conduit, with the same semantics as
| |
| writeFinal | back to summary |
|---|---|
| public long writeFinal(ByteBuffer[] srcs, int offs, int len) throws IOException Overrides org. Implements org. Doc from org. Writes some data to the conduit, with the same semantics as
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AbstractFramedStreamSinkConduit. | |
| pack-priv final ByteBuffer[] | |
| pack-priv final int | |
| pack-priv final int | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| private |
| callback | back to summary |
|---|---|
| pack-priv final AbstractFramedStreamSinkConduit. | |
| data | back to summary |
|---|---|
| pack-priv final ByteBuffer[] data | |
| len | back to summary |
|---|---|
| pack-priv final int len | |
| offs | back to summary |
|---|---|
| pack-priv final int offs | |
| remaining | back to summary |
|---|---|
| pack-priv long remaining | |
| Frame | back to summary |
|---|---|
| private Frame(AbstractFramedStreamSinkConduit. | |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| done | back to summary |
|---|---|
| public void done() | |
| failed | back to summary |
|---|---|
| public void failed(final IOException e) | |
| Modifier and Type | Field and Description |
|---|---|
| private final PooledByteBuffer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| buffer | back to summary |
|---|---|
| private final PooledByteBuffer buffer | |
| PooledBufferFrameCallback | back to summary |
|---|---|
| public PooledBufferFrameCallback(PooledByteBuffer buffer) | |
| done | back to summary |
|---|---|
| public void done() Implements io.
| |
| failed | back to summary |
|---|---|
| public void failed(IOException e) Implements io.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final PooledByteBuffer[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void |
| buffers | back to summary |
|---|---|
| private final PooledByteBuffer[] buffers | |
| PooledBuffersFrameCallback | back to summary |
|---|---|
| public PooledBuffersFrameCallback(PooledByteBuffer... buffers) | |
| done | back to summary |
|---|---|
| public void done() Implements io.
| |
| failed | back to summary |
|---|---|
| public void failed(IOException e) Implements io.
| |