ServerSocketChannel implementation that uses linux EPOLL Edge-Triggered Mode for
maximal performance.
ServerSocketChannel and UnixChannel,
EpollServerSocketChannel allows the following options in the option map:
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private volatile int | |
| private final EventLoopGroup | |
| private static final InternalLogger | |
| private volatile int | |
| private static final Set | |
| private static final Set | |
| private volatile Collection |
| Access | Constructor and Description |
|---|---|
| public | |
| public | EpollServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, ProtocolFamily protocolFamily)
|
| public | EpollServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, int fd, ProtocolFamily protocolFamily)
|
| private | EpollServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, LinuxSocket socket)
|
| Modifier and Type | Method and Description |
|---|---|
| public EventLoopGroup | childEventLoopGroup()
Implements io. EventLoopGroup that is used to register the child Channels on after accepting
these.
|
| protected void | doBind(SocketAddress
the localAddress)SocketAddress to bound to.Overrides io. Channel to the SocketAddress
|
| protected void | |
| protected boolean | doConnect(SocketAddress
the address of the remote peer. remoteAddress, SocketAddress the local address of this channel. localAddress, Buffer the initial data that is written during connect
(if initialData)ChannelOption#TCP_FASTOPEN_CONNECT is supported and configured).
If data is written care must be taken to update the
reader offset.Overrides io. |
| protected boolean | doFinishConnect(SocketAddress
the remote address of the peer. requestedRemoteAddress)Overrides io. |
| protected void | doShutdown(ChannelShutdownDirection
the direction to shut down. direction)Implements abstract io. Channel.
|
| protected void | doWriteNow(AbstractChannel<UnixChannel, SocketAddress, SocketAddress>.
the writeHandleWriteSink 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.
|
| protected AbstractEpollChannel. | epollInReady(AbstractChannel<UnixChannel, SocketAddress, SocketAddress>.
Implements abstract io. |
| protected Object | filterOutboundMessage(Object
the message to filter / convert. msg)Overrides io. AbstractChannel, so that
the Channel implementation converts the message to another.
|
| private int | |
| protected <T> T | getExtendedOption(ChannelOption<T>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| private int | |
| private int | |
| private int | |
| protected boolean | isExtendedOptionSupported(ChannelOption<?>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| private boolean | |
| private static boolean | |
| private boolean | |
| private boolean | |
| public boolean | isShutdown(ChannelShutdownDirection direction)
Implements io. true if the ChannelShutdownDirection of the Channel was shutdown before.
|
| private Channel | |
| private void | |
| protected <T> void | setExtendedOption(ChannelOption<T>
the option, T value)ChannelOption.Overrides io. ChannelOptions.
|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | setTcpFastopen(int
number of requests to be pending for fastopen at a given point in time
for security. pendingFastOpenRequestsThreshold)Enables tcpFastOpen on the server channel. |
| private void | |
| private static Set | |
| private static Set | |
| pack-priv Collection |
| acceptedAddress | back to summary |
|---|---|
| private final byte[] acceptedAddress | |
| backlog | back to summary |
|---|---|
| private volatile int backlog | |
| childEventLoopGroup | back to summary |
|---|---|
| private final EventLoopGroup childEventLoopGroup | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| pendingFastOpenRequestsThreshold | back to summary |
|---|---|
| private volatile int pendingFastOpenRequestsThreshold | |
| 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 | |
| tcpMd5SigAddresses | back to summary |
|---|---|
| private volatile Collection<InetAddress> tcpMd5SigAddresses | |
| EpollServerSocketChannel | back to summary |
|---|---|
| public EpollServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup) | |
| EpollServerSocketChannel | back to summary |
|---|---|
| public EpollServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, ProtocolFamily protocolFamily) | |
| EpollServerSocketChannel | back to summary |
|---|---|
| public EpollServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, int fd, ProtocolFamily protocolFamily) | |
| EpollServerSocketChannel | back to summary |
|---|---|
| private EpollServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, LinuxSocket socket) | |
| childEventLoopGroup | back to summary |
|---|---|
| public EventLoopGroup childEventLoopGroup() Implements io. Doc from io. Returns the
| |
| doBind | back to summary |
|---|---|
| protected void doBind(SocketAddress localAddress) throws Exception Overrides io. Doc from io. Bind the
| |
| doClose | back to summary |
|---|---|
| protected void doClose() throws Exception Overrides io. Doc from io. Close the | |
| doConnect | back to summary |
|---|---|
| protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress, Buffer initialData) Overrides io. Doc from io. Connect to the remote peer
| |
| doFinishConnect | back to summary |
|---|---|
| protected boolean doFinishConnect(SocketAddress requestedRemoteAddress) Overrides io. Doc from io. Finish a connect request. This method should never be directly called, use
| |
| doShutdown | back to summary |
|---|---|
| protected void doShutdown(ChannelShutdownDirection direction) Implements abstract io. Doc from io. Shutdown one direction of the
| |
| doWriteNow | back to summary |
|---|---|
| protected void doWriteNow(AbstractChannel<UnixChannel, SocketAddress, SocketAddress>. Implements abstract io. Doc from io. Called in a loop when writes should be performed until this method returns
| |
| epollInReady | back to summary |
|---|---|
| protected AbstractEpollChannel. Implements abstract io. Doc from io. Called once EPOLLIN event is ready to be processed
| |
| 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 | |
| getBacklog | back to summary |
|---|---|
| private int getBacklog() | |
| getExtendedOption | back to summary |
|---|---|
| protected <T> T getExtendedOption(ChannelOption<T> option) Overrides io. Doc from io. Override to add support for more
| |
| getReceiveBufferSize | back to summary |
|---|---|
| private int getReceiveBufferSize() | |
| getTcpDeferAccept | back to summary |
|---|---|
| private int getTcpDeferAccept() | |
| getTcpFastopen | back to summary |
|---|---|
| private int getTcpFastopen() Returns threshold value of number of pending for fast open connect.
| |
| isExtendedOptionSupported | back to summary |
|---|---|
| protected boolean isExtendedOptionSupported(ChannelOption<?> option) Overrides io. Doc from io. Override to add support for more
| |
| isIpFreebind | back to summary |
|---|---|
| private boolean isIpFreebind() | |
| isOptionSupported | back to summary |
|---|---|
| private static boolean isOptionSupported(SocketProtocolFamily family, ChannelOption<?> option) | |
| isReuseAddress | back to summary |
|---|---|
| private boolean isReuseAddress() | |
| isReusePort | back to summary |
|---|---|
| private boolean isReusePort() | |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown(ChannelShutdownDirection direction) Implements io. Doc from io. Returns
| |
| newChildChannel | back to summary |
|---|---|
| private Channel newChildChannel(int fd, byte[] address, int offset, int len) | |
| setBacklog | back to summary |
|---|---|
| private void setBacklog(int backlog) | |
| setExtendedOption | back to summary |
|---|---|
| protected <T> void setExtendedOption(ChannelOption<T> option, T value) Overrides io. Doc from io. Override to add support for more
| |
| setIpFreebind | back to summary |
|---|---|
| private void setIpFreebind(boolean reusePort) | |
| setReceiveBufferSize | back to summary |
|---|---|
| private void setReceiveBufferSize(int receiveBufferSize) | |
| setReuseAddress | back to summary |
|---|---|
| private void setReuseAddress(boolean reuseAddress) | |
| setReusePort | back to summary |
|---|---|
| private void setReusePort(boolean reusePort) | |
| setTcpDeferAccept | back to summary |
|---|---|
| private void setTcpDeferAccept(int deferAccept) | |
| setTcpFastopen | back to summary |
|---|---|
| private void setTcpFastopen(int pendingFastOpenRequestsThreshold) Enables tcpFastOpen on the server channel. If the underlying os doesn't support TCP_FASTOPEN setting this has no effect. This has to be set before doing listen on the socket otherwise this takes no effect.
| |
| setTcpMd5Sig | back to summary |
|---|---|
| private void setTcpMd5Sig(Map<InetAddress, byte[]> keys) | |
| supportedOptions | back to summary |
|---|---|
| private static Set | |
| supportedOptionsDomainSocket | back to summary |
|---|---|
| private static Set | |
| tcpMd5SigAddresses | back to summary |
|---|---|
| pack-priv Collection | |