Top Inners Fields Constructors Methods
io.netty.channel.epoll

public abstract Class AbstractEpollStreamChannel

extends AbstractEpollChannel
implements DuplexChannel
Class Inheritance
All Implemented Interfaces
io.netty.channel.socket.DuplexChannel, io.netty.channel.Channel, java.lang.Comparable, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap
Known Direct Subclasses
io.netty.channel.epoll.EpollDomainSocketChannel, io.netty.channel.epoll.EpollSocketChannel
Imports
io.netty.buffer.ByteBuf, .ByteBufAllocator, io.netty.channel.Channel, .ChannelConfig, .ChannelFuture, .ChannelFutureListener, .ChannelMetadata, .ChannelOutboundBuffer, .ChannelPipeline, .ChannelPromise, .DefaultFileRegion, .EventLoop, .FileRegion, .RecvByteBufAllocator, io.netty.channel.internal.ChannelUtils, io.netty.channel.socket.DuplexChannel, io.netty.channel.unix.FileDescriptor, .IovArray, .SocketWritableByteChannel, .UnixChannelUtil, io.netty.util.internal.PlatformDependent, .StringUtil, .UnstableApi, io.netty.util.internal.logging.InternalLogger, .InternalLoggerFactory, java.io.IOException, java.net.SocketAddress, java.nio.ByteBuffer, java.nio.channels.ClosedChannelException, .WritableByteChannel, java.util.Queue, java.util.concurrent.Executor

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
pack-priv class
private class
private class
protected abstract class
private class

Field Summary

Modifier and TypeField and Description
private WritableByteChannel
private static final String
private final Runnable
private static final InternalLogger
private static final ChannelMetadata
private FileDescriptor
private FileDescriptor
private volatile Queue<AbstractEpollStreamChannel.SpliceInTask>
Inherited from io.netty.channel.epoll.AbstractEpollChannel:
activeepollInReadyRunnablePendingflagsinputClosedSeenErrorOnReadsocket

Constructor Summary

AccessConstructor and Description
protected
protected
pack-priv
pack-priv
protected
protected

Method Summary

Modifier and TypeMethod and Description
private void
private void
adjustMaxBytesPerGatheringWrite(long attempted, long written, long oldMaxBytesPerGatheringWrite)

private void
protected void
protected final void
doShutdownOutput()

Overrides io.netty.channel.AbstractChannel.doShutdownOutput.

Called when conditions justify shutting down the output portion of the channel.
protected void
doWrite(ChannelOutboundBuffer in)

Implements abstract io.netty.channel.AbstractChannel.doWrite.

Flush the content of the given buffer to the remote peer.
private int

Returns:

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
doWriteMultiple
(ChannelOutboundBuffer
the collection which contains objects to write.
in
)

Attempt to write multiple ByteBuf objects.

protected int

Returns:

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
doWriteSingle
(ChannelOutboundBuffer
the collection which contains objects to write.
in
)

Attempt to write a single object.

private void
protected Object
filterOutboundMessage(Object msg)

Overrides io.netty.channel.AbstractChannel.filterOutboundMessage.

Invoked when a new message is added to a ChannelOutboundBuffer of this AbstractChannel, so that the Channel implementation converts the message to another.
public boolean
isInputShutdown()

Implements io.netty.channel.socket.DuplexChannel.isInputShutdown.

Returns true if and only if the remote peer shut down its output so that no more data is received from this channel.
public boolean
public boolean
isShutdown()

Implements io.netty.channel.socket.DuplexChannel.isShutdown.

Determine if both the input and output of this channel have been shutdown.
public ChannelMetadata
metadata()

Overrides io.netty.channel.epoll.AbstractEpollChannel.metadata.

Implements io.netty.channel.Channel.metadata.

Return the ChannelMetadata of the Channel which describe the nature of the Channel.
protected AbstractEpollChannel.AbstractEpollUnsafe
newUnsafe()

Implements abstract io.netty.channel.epoll.AbstractEpollChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel
private static void
public ChannelFuture
shutdown()

Implements io.netty.channel.socket.DuplexChannel.shutdown.

Will shutdown the input and output sides of this channel.
public ChannelFuture
shutdown(final ChannelPromise
will be completed when both shutdown operations complete.
promise
)

Implements io.netty.channel.socket.DuplexChannel.shutdown.

Will shutdown the input and output sides of this channel.
private static void
shutdownDone(ChannelFuture shutdownOutputFuture, ChannelFuture shutdownInputFuture, ChannelPromise promise)

public ChannelFuture
public ChannelFuture
shutdownInput(final ChannelPromise promise)

Implements io.netty.channel.socket.DuplexChannel.shutdownInput.

Will shutdown the input and notify ChannelPromise.
private void
public ChannelFuture
public ChannelFuture
shutdownOutput(final ChannelPromise promise)

Implements io.netty.channel.socket.DuplexChannel.shutdownOutput.

Will shutdown the output and notify ChannelPromise.
private void
shutdownOutputDone(final ChannelFuture shutdownOutputFuture, final ChannelPromise promise)

public final ChannelFuture
public final ChannelFuture
spliceTo(final AbstractEpollStreamChannel ch, final int len, final ChannelPromise promise)

Splice from this AbstractEpollStreamChannel to another AbstractEpollStreamChannel.

public final ChannelFuture
spliceTo(final FileDescriptor ch, final int offset, final int len)

Splice from this AbstractEpollStreamChannel to another FileDescriptor.

public final ChannelFuture
spliceTo(final FileDescriptor ch, final int offset, final int len, final ChannelPromise promise)

Splice from this AbstractEpollStreamChannel to another FileDescriptor.

private int

Returns:

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
writeBytes
(ChannelOutboundBuffer
the collection which contains objects to write.
in
,
ByteBuf
the ByteBuf from which the bytes should be written
buf
)

Write bytes form the given ByteBuf to the underlying java.nio.channels.Channel.

private int

Returns:

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
writeBytesMultiple
(ChannelOutboundBuffer
the collection which contains objects to write.
in
,
IovArray
The array which contains the content to write.
array
)

Write multiple bytes via IovArray.

private int

Returns:

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
writeBytesMultiple
(ChannelOutboundBuffer
the collection which contains objects to write.
in
,
ByteBuffer[]
The buffers to write.
nioBuffers
,
int
The number of buffers to write.
nioBufferCnt
,
long
The number of bytes we expect to write.
expectedWrittenBytes
,
long
The maximum number of bytes we should attempt to write.
maxBytesPerGatheringWrite
)

Write multiple bytes via ByteBuffer array.

private int

Returns:

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
writeDefaultFileRegion
(ChannelOutboundBuffer
the collection which contains objects to write.
in
,
DefaultFileRegion
the DefaultFileRegion from which the bytes should be written
region
)

Write a DefaultFileRegion

private int

Returns:

The value that should be decremented from the write quantum which starts at ChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
  • 0 - if no write was attempted. This is appropriate if an empty ByteBuf (or other empty content) is encountered
  • 1 - if a single call to write data was made to the OS
  • ChannelUtils#WRITE_STATUS_SNDBUF_FULL - if an attempt to write data was made to the OS, but no data was accepted
writeFileRegion
(ChannelOutboundBuffer
the collection which contains objects to write.
in
,
FileRegion
the FileRegion from which the bytes should be written
region
)

Write a FileRegion

Inherited from io.netty.channel.epoll.AbstractEpollChannel:
checkResolvableclearEpollInclearFlagconfigdoBeginReaddoBinddoConnectdoConnect0doDeregisterdoDisconnectdoReadBytesdoRegisterdoWriteBytesdoWriteOrSendBytesfdisActiveisCompatibleisFlagSetisOpenisSoErrorZerolocalAddress0newDirectBuffernewDirectBufferremoteAddress0resetCachedAddressessetFlagshouldBreakEpollInReady