NettyServerCnxnFactory (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server

## Class NettyServerCnxnFactory

- java.lang.Object
- - org.apache.zookeeper.server.ServerCnxnFactory
  - - org.apache.zookeeper.server.NettyServerCnxnFactory

-     public class NettyServerCnxnFactory
      extends ServerCnxnFactory

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `NETTY_ADVANCED_FLOW_CONTROL`
    `static String` | `OUTSTANDING_HANDSHAKE_LIMIT`
    `static String` | `PORT_UNIFICATION_KEY` Allow client-server sockets to accept both SSL and plaintext connections

    - ### Fields inherited from class org.apache.zookeeper.server.ServerCnxnFactory

      `cnxns, login, maxCnxns, saslServerCallbackHandler, secure, zkServer, ZOOKEEPER_MAX_CONNECTION_DEFAULT, ZOOKEEPER_SERVER_CNXN_FACTORY`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeAll(ServerCnxn.DisconnectReason reason)`
    `void` | `configure(InetSocketAddress addr, int maxClientCnxns, int backlog, boolean secure)`
    `Iterable<Map<String,Object>>` | `getAllConnectionInfo(boolean brief)`
    `Iterable<ServerCnxn>` | `getConnections()`
    `InetSocketAddress` | `getLocalAddress()`
    `int` | `getLocalPort()`
    `int` | `getMaxClientCnxnsPerHost()` Maximum number of connections allowed from particular host (ip)
    `int` | `getOutstandingHandshakeNum()`
    `io.netty.channel.Channel` | `getParentChannel()`
    `int` | `getSocketListenBacklog()` The maximum queue length of the ZooKeeper server's socket
    `void` | `join()`
    `void` | `reconfigure(InetSocketAddress addr)`
    `void` | `resetAllConnectionStats()`
    `void` | `setAdvancedFlowControlEnabled(boolean advancedFlowControlEnabled)`
    `void` | `setMaxClientCnxnsPerHost(int max)` Maximum number of connections allowed from particular host (ip)
    `void` | `setOutstandingHandshakeLimit(int limit)`
    `void` | `setSecure(boolean secure)`
    `void` | `shutdown()`
    `void` | `start()`
    `void` | `startup(ZooKeeperServer zks, boolean startServer)`

    - ### Methods inherited from class org.apache.zookeeper.server.ServerCnxnFactory

      `addSession, closeSession, configure, configure, configureSaslLogin, createFactory, createFactory, createFactory, createFactory, createFactory, getMaxCnxns, getNumAliveConnections, getUserName, getZooKeeperServer, initMaxCnxns, isSecure, limitTotalNumberOfCnxns, registerConnection, removeCnxnFromSessionMap, setZooKeeperServer, startup, unregisterConnection`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PORT_UNIFICATION_KEY

          public static final String PORT_UNIFICATION_KEY

      Allow client-server sockets to accept both SSL and plaintext connections
      See Also:
        Constant Field Values

    - #### OUTSTANDING_HANDSHAKE_LIMIT

          public static final String OUTSTANDING_HANDSHAKE_LIMIT

      See Also:
        Constant Field Values

    - #### NETTY_ADVANCED_FLOW_CONTROL

          public static final String NETTY_ADVANCED_FLOW_CONTROL

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setOutstandingHandshakeLimit

          public void setOutstandingHandshakeLimit(int limit)

    - #### closeAll

          public void closeAll(ServerCnxn.DisconnectReason reason)

      Specified by:
        `closeAll` in class `ServerCnxnFactory`

    - #### configure

          public void configure(InetSocketAddress addr,
                                int maxClientCnxns,
                                int backlog,
                                boolean secure)
                         throws IOException

      Specified by:
        `configure` in class `ServerCnxnFactory`
      Throws:
        `IOException`

    - #### getMaxClientCnxnsPerHost

          public int getMaxClientCnxnsPerHost()

      Maximum number of connections allowed from particular host (ip)
      Specified by:
        `getMaxClientCnxnsPerHost` in class `ServerCnxnFactory`

    - #### setMaxClientCnxnsPerHost

          public void setMaxClientCnxnsPerHost(int max)

      Maximum number of connections allowed from particular host (ip)
      Specified by:
        `setMaxClientCnxnsPerHost` in class `ServerCnxnFactory`

    - #### getSocketListenBacklog

          public int getSocketListenBacklog()

      The maximum queue length of the ZooKeeper server's socket
      Specified by:
        `getSocketListenBacklog` in class `ServerCnxnFactory`

    - #### getLocalPort

          public int getLocalPort()

      Specified by:
        `getLocalPort` in class `ServerCnxnFactory`

    - #### join

          public void join()
                    throws InterruptedException

      Specified by:
        `join` in class `ServerCnxnFactory`
      Throws:
        `InterruptedException`

    - #### shutdown

          public void shutdown()

      Specified by:
        `shutdown` in class `ServerCnxnFactory`

    - #### start

          public void start()

      Specified by:
        `start` in class `ServerCnxnFactory`

    - #### reconfigure

          public void reconfigure(InetSocketAddress addr)

      Specified by:
        `reconfigure` in class `ServerCnxnFactory`

    - #### startup

          public void startup(ZooKeeperServer zks,
                              boolean startServer)
                       throws IOException,
                              InterruptedException

      Specified by:
        `startup` in class `ServerCnxnFactory`
      Throws:
        `IOException`
        `InterruptedException`

    - #### getConnections

          public Iterable<ServerCnxn> getConnections()

      Specified by:
        `getConnections` in class `ServerCnxnFactory`

    - #### getLocalAddress

          public InetSocketAddress getLocalAddress()

      Specified by:
        `getLocalAddress` in class `ServerCnxnFactory`

    - #### resetAllConnectionStats

          public void resetAllConnectionStats()

      Specified by:
        `resetAllConnectionStats` in class `ServerCnxnFactory`

    - #### getAllConnectionInfo

          public Iterable<Map<String,Object>> getAllConnectionInfo(boolean brief)

      Specified by:
        `getAllConnectionInfo` in class `ServerCnxnFactory`

    - #### setAdvancedFlowControlEnabled

          public void setAdvancedFlowControlEnabled(boolean advancedFlowControlEnabled)

    - #### setSecure

          public void setSecure(boolean secure)

    - #### getParentChannel

          public io.netty.channel.Channel getParentChannel()

    - #### getOutstandingHandshakeNum

          public int getOutstandingHandshakeNum()

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.