SocketChannel implementation that uses linux EPOLL Edge-Triggered Mode for
maximal performance.
SocketChannel and UnixChannel,
EpollSocketChannel allows the following options in the option map:
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private WritableByteChannel | |
| private static final String | |
| private volatile DomainSocketReadMode | |
| private static final Set | |
| private static final Set | |
| private volatile boolean | |
| private volatile Collection |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| private | |
| pack-priv | EpollSocketChannel(EpollServerSocketChannel parent, EventLoop eventLoop, LinuxSocket fd, SocketAddress remoteAddress)
|
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | doConnect0(SocketAddress remote, Buffer initialData)
Overrides io. |
| protected void | doShutdown(ChannelShutdownDirection
the direction to shut down. direction)Implements abstract io. Channel.
|
| private void | Returns: if we should continue with writing more messages.the writeSinkWriteSink used to track write results.Attempt to write multiple |
| protected void | doWriteNow(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.
the writeSinkWriteSink that must be completed with the write
progress.
WriteSink#complete(long, long, int, boolean) or
WriteSink#complete(long, Throwable, boolean) must be called
exactly once before this method returns non-exceptional.Implements abstract io. false or there are
no more messages to write.
|
| private void | Returns: if we should continue with writing more messages.the writeSinkWriteSink used to track write results.Attempt to write a single object. |
| private AbstractEpollChannel. | |
| protected AbstractEpollChannel. | epollInReady(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.
Implements abstract io. |
| private AbstractEpollChannel. | |
| protected Object | filterOutboundMessage(Object
the message to filter / convert. msg)Overrides io. AbstractChannel, so that
the Channel implementation converts the message to another.
|
| protected <T> T | getExtendedOption(ChannelOption<T>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| private PeerCredentials | |
| private DomainSocketReadMode | |
| private int | |
| private int | |
| private int | |
| private int | |
| private EpollTcpInfo | |
| private int | |
| private int | |
| private int | |
| private long | |
| private int | |
| private int | |
| protected boolean | isExtendedOptionSupported(ChannelOption<?>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| public boolean | |
| private boolean | |
| private static boolean | |
| private boolean | |
| public boolean | isShutdown(ChannelShutdownDirection direction)
Implements io. true if the ChannelShutdownDirection of the Channel was shutdown before.
|
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private static WriteHandleFactory | |
| protected Future | prepareToClose()
Overrides io. Channel.
|
| protected <T> void | setExtendedOption(ChannelOption<T>
the option, T value)ChannelOption.Overrides io. ChannelOptions.
|
| private void | setIpTransparent(boolean transparent)
If |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | setTcpNotSentLowAt(long
is a uint32_t tcpNotSentLowAt)Set the |
| private void | |
| private void | |
| private void | |
| private static Set | |
| private static Set | |
| private void | Returns: if we should continue with writing more messages.the writeSinkWriteSink used to track write results.Write bytes form the given |
| private long | Returns: if we should continue with writing more messages.The array which contains the content to write. array)Write multiple bytes via |
| private long | Returns: write result.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 |
| private void | Returns: if we should continue with writing more messages.the writeSinkWriteSink used to track write results.Write a |
| private void | Returns: if we should continue with writing more messages.the writeSinkWriteSink used to track write results.Write a |
| byteChannel | back to summary |
|---|---|
| private WritableByteChannel byteChannel | |
| EXPECTED_TYPES | back to summary |
|---|---|
| private static final String EXPECTED_TYPES | |
| mode | back to summary |
|---|---|
| private volatile DomainSocketReadMode mode | |
| SUPPORTED_OPTIONS | back to summary |
|---|---|
| private static final Set<ChannelOption<?>> SUPPORTED_OPTIONS | |
| SUPPORTED_OPTIONS_DOMAIN_SOCKET | back to summary |
|---|---|
| private static final Set<ChannelOption<?>> SUPPORTED_OPTIONS_DOMAIN_SOCKET | |
| tcpFastopen | back to summary |
|---|---|
| private volatile boolean tcpFastopen | |
| tcpMd5SigAddresses | back to summary |
|---|---|
| private volatile Collection<InetAddress> tcpMd5SigAddresses | |
| EpollSocketChannel | back to summary |
|---|---|
| public EpollSocketChannel(EventLoop eventLoop) | |
| EpollSocketChannel | back to summary |
|---|---|
| public EpollSocketChannel(EventLoop eventLoop, ProtocolFamily protocolFamily) | |
| EpollSocketChannel | back to summary |
|---|---|
| public EpollSocketChannel(EventLoop eventLoop, int fd, ProtocolFamily family) | |
| EpollSocketChannel | back to summary |
|---|---|
| private EpollSocketChannel(EventLoop eventLoop, LinuxSocket socket) | |
| EpollSocketChannel | back to summary |
|---|---|
| pack-priv EpollSocketChannel(EpollServerSocketChannel parent, EventLoop eventLoop, LinuxSocket fd, SocketAddress remoteAddress) | |
| doConnect0 | back to summary |
|---|---|
| protected boolean doConnect0(SocketAddress remote, Buffer initialData) throws Exception Overrides io.
| |
| doShutdown | back to summary |
|---|---|
| protected void doShutdown(ChannelShutdownDirection direction) throws Exception Implements abstract io. Doc from io. Shutdown one direction of the
| |
| doWriteMultiple | back to summary |
|---|---|
| private void doWriteMultiple(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>. Attempt to write multiple
| |
| doWriteNow | back to summary |
|---|---|
| protected void doWriteNow(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>. Implements abstract io. Doc from io. Called in a loop when writes should be performed until this method returns
| |
| doWriteSingle | back to summary |
|---|---|
| private void doWriteSingle(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>. Attempt to write a single object.
| |
| epollInReadFd | back to summary |
|---|---|
| private AbstractEpollChannel. | |
| epollInReady | back to summary |
|---|---|
| protected AbstractEpollChannel. Implements abstract io. Doc from io. Called once EPOLLIN event is ready to be processed
| |
| epollInReadyBytes | back to summary |
|---|---|
| private AbstractEpollChannel. | |
| filterOutboundMessage | back to summary |
|---|---|
| protected Object filterOutboundMessage(Object msg) Overrides io. Doc from io. Invoked when a new message is added to to the outbound queue of this | |
| getExtendedOption | back to summary |
|---|---|
| protected <T> T getExtendedOption(ChannelOption<T> option) Overrides io. Doc from io. Override to add support for more
| |
| getPeerCredentials | back to summary |
|---|---|
| private PeerCredentials getPeerCredentials() | |
| getReadMode | back to summary |
|---|---|
| private DomainSocketReadMode getReadMode() | |
| getReceiveBufferSize | back to summary |
|---|---|
| private int getReceiveBufferSize() | |
| getSendBufferSize | back to summary |
|---|---|
| private int getSendBufferSize() | |
| getSoBusyPoll | back to summary |
|---|---|
| private int getSoBusyPoll() Get the | |
| getSoLinger | back to summary |
|---|---|
| private int getSoLinger() | |
| getTcpInfo | back to summary |
|---|---|
| private EpollTcpInfo getTcpInfo() Updates and returns the | |
| getTcpKeepCnt | back to summary |
|---|---|
| private int getTcpKeepCnt() Get the | |
| getTcpKeepIdle | back to summary |
|---|---|
| private int getTcpKeepIdle() Get the | |
| getTcpKeepIntvl | back to summary |
|---|---|
| private int getTcpKeepIntvl() Get the | |
| getTcpNotSentLowAt | back to summary |
|---|---|
| private long getTcpNotSentLowAt() Get the
| |
| getTcpUserTimeout | back to summary |
|---|---|
| private int getTcpUserTimeout() Get the | |
| getTrafficClass | back to summary |
|---|---|
| private int getTrafficClass() | |
| isExtendedOptionSupported | back to summary |
|---|---|
| protected boolean isExtendedOptionSupported(ChannelOption<?> option) Overrides io. Doc from io. Override to add support for more
| |
| isIpTransparent | back to summary |
|---|---|
| public boolean isIpTransparent() Returns | |
| isKeepAlive | back to summary |
|---|---|
| private boolean isKeepAlive() | |
| isOptionSupported | back to summary |
|---|---|
| private static boolean isOptionSupported(SocketProtocolFamily family, ChannelOption<?> option) | |
| isReuseAddress | back to summary |
|---|---|
| private boolean isReuseAddress() | |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown(ChannelShutdownDirection direction) Implements io. Doc from io. Returns
| |
| isTcpCork | back to summary |
|---|---|
| private boolean isTcpCork() Get the | |
| isTcpFastOpenConnect | back to summary |
|---|---|
| private boolean isTcpFastOpenConnect() Returns | |
| isTcpNoDelay | back to summary |
|---|---|
| private boolean isTcpNoDelay() | |
| isTcpQuickAck | back to summary |
|---|---|
| private boolean isTcpQuickAck() Returns | |
| newWriteHandleFactory | back to summary |
|---|---|
| private static WriteHandleFactory newWriteHandleFactory() | |
| prepareToClose | back to summary |
|---|---|
| protected Future Overrides io. Doc from io. Prepares to close the
| |
| setExtendedOption | back to summary |
|---|---|
| protected <T> void setExtendedOption(ChannelOption<T> option, T value) Overrides io. Doc from io. Override to add support for more
| |
| setIpTransparent | back to summary |
|---|---|
| private void setIpTransparent(boolean transparent) If | |
| setKeepAlive | back to summary |
|---|---|
| private void setKeepAlive(boolean keepAlive) | |
| setReadMode | back to summary |
|---|---|
| private void setReadMode(DomainSocketReadMode mode) | |
| setReceiveBufferSize | back to summary |
|---|---|
| private void setReceiveBufferSize(int receiveBufferSize) | |
| setReuseAddress | back to summary |
|---|---|
| private void setReuseAddress(boolean reuseAddress) | |
| setSendBufferSize | back to summary |
|---|---|
| private void setSendBufferSize(int sendBufferSize) | |
| setSoBusyPoll | back to summary |
|---|---|
| private void setSoBusyPoll(int loopMicros) Set the | |
| setSoLinger | back to summary |
|---|---|
| private void setSoLinger(int soLinger) | |
| setTcpCork | back to summary |
|---|---|
| private void setTcpCork(boolean tcpCork) Set the | |
| setTcpFastOpenConnect | back to summary |
|---|---|
| private void setTcpFastOpenConnect(boolean fastOpenConnect) Enables client TCP fast open. | |
| setTcpKeepCnt | back to summary |
|---|---|
| private void setTcpKeepCnt(int probes) Set the | |
| setTcpKeepIdle | back to summary |
|---|---|
| private void setTcpKeepIdle(int seconds) Set the | |
| setTcpKeepIntvl | back to summary |
|---|---|
| private void setTcpKeepIntvl(int seconds) Set the | |
| setTcpMd5Sig | back to summary |
|---|---|
| private void setTcpMd5Sig(Map<InetAddress, byte[]> keys) Set the | |
| setTcpNoDelay | back to summary |
|---|---|
| private void setTcpNoDelay(boolean tcpNoDelay) | |
| setTcpNotSentLowAt | back to summary |
|---|---|
| private void setTcpNotSentLowAt(long tcpNotSentLowAt) Set the
| |
| setTcpQuickAck | back to summary |
|---|---|
| private void setTcpQuickAck(boolean quickAck) Set the | |
| setTcpUserTimeout | back to summary |
|---|---|
| private void setTcpUserTimeout(int milliseconds) Set the | |
| setTrafficClass | back to summary |
|---|---|
| private void setTrafficClass(int trafficClass) | |
| supportedOptions | back to summary |
|---|---|
| private static Set | |
| supportedOptionsDomainSocket | back to summary |
|---|---|
| private static Set | |
| writeBytes | back to summary |
|---|---|
| private void writeBytes(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>. Write bytes form the given
| |
| writeBytesMultiple | back to summary |
|---|---|
| private long writeBytesMultiple(IovArray array) throws IOException Write multiple bytes via
| |
| writeBytesMultiple | back to summary |
|---|---|
| private long writeBytesMultiple(ByteBuffer[] nioBuffers, int nioBufferCnt, long expectedWrittenBytes, long maxBytesPerGatheringWrite) throws IOException Write multiple bytes via
| |
| writeDefaultFileRegion | back to summary |
|---|---|
| private void writeDefaultFileRegion(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>. Write a
| |
| writeFileRegion | back to summary |
|---|---|
| private void writeFileRegion(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>. Write a
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected BufferAllocator | |
| protected int | write(final ByteBuffer buf, final int pos, final int limit)
Overrides io. |
| EpollSocketWritableByteChannel | back to summary |
|---|---|
| pack-priv EpollSocketWritableByteChannel() | |
| alloc | back to summary |
|---|---|
| protected BufferAllocator alloc() Implements abstract io.
| |
| write | back to summary |
|---|---|
| protected int write(final ByteBuffer buf, final int pos, final int limit) throws IOException Overrides io.
| |