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

org.apache.zookeeper.server.controller

## Class ControllableConnection

- java.lang.Object
- - org.apache.zookeeper.server.ServerCnxn
  - - org.apache.zookeeper.server.NIOServerCnxn
    - - org.apache.zookeeper.server.controller.ControllableConnection

- All Implemented Interfaces:
    Watcher

      public class ControllableConnection
      extends NIOServerCnxn

  Extension of NIOServerCnxn which can inject changes per controller commands. Similar extensions can implement on top of NettyServerCnxn as well.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.zookeeper.server.ServerCnxn

      `ServerCnxn.CloseRequestException, ServerCnxn.DisconnectReason, ServerCnxn.EndOfStreamException`

    - ### Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher

      `Watcher.Event, Watcher.WatcherType`

  - ### Field Summary

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

      `incomingBuffer`

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

      `count, disconnectReason, established, lastCxid, lastLatency, lastOp, lastResponseTime, lastZxid, maxLatency, me, minLatency, packetsReceived, packetsSent, requestsProcessedCount, totalLatency, zooKeeperSaslServer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControllableConnection(ZooKeeperServer zk, SocketChannel sock, SelectionKey sk, NIOServerCnxnFactory factory, NIOServerCnxnFactory.SelectorThread selectorThread)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `readRequest()`
    `int` | `sendResponse(ReplyHeader header, Record record, String tag)`

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

      `close, closeSock, disableRecv, disableSelectable, enableRecv, enableSelectable, getClientCertificateChain, getInterestOps, getRemoteSocketAddress, getSessionId, getSessionTimeout, getSocketAddress, isSecure, isSelectable, isSocketOpen, process, sendBuffer, sendCloseSession, sendResponse, serverStats, setClientCertificateChain, setSessionId, setSessionTimeout, toString`

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

      `addAuthInfo, cleanupWriterSocket, decrOutstandingAndCheckThrottle, dumpConnectionInfo, getAuthInfo, getAvgLatency, getConnectionInfo, getEstablished, getHostAddress, getLastCxid, getLastLatency, getLastOperation, getLastResponseTime, getLastZxid, getMaxLatency, getMinLatency, getOutstandingRequests, getPacketsReceived, getPacketsSent, getSessionIdHex, incrOutstandingAndCheckThrottle, incrPacketsReceived, incrPacketsSent, isInvalid, isStale, isZKServerRunning, packetReceived, packetSent, removeAuthInfo, resetStats, serialize, serializeRecord, setInvalid, setStale, updateStatsForResponse`

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

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

- - ### Constructor Detail

    - #### ControllableConnection

          public ControllableConnection(ZooKeeperServer zk,
                                        SocketChannel sock,
                                        SelectionKey sk,
                                        NIOServerCnxnFactory factory,
                                        NIOServerCnxnFactory.SelectorThread selectorThread)
                                 throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### sendResponse

          public int sendResponse(ReplyHeader header,
                                  Record record,
                                  String tag)

      Overrides:
        `sendResponse` in class `ServerCnxn`

    - #### readRequest

          protected void readRequest()
                              throws IOException

      Overrides:
        `readRequest` in class `NIOServerCnxn`
      Throws:
        `IOException`

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