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

org.apache.zookeeper

## Class ClientCnxnSocketNetty

- java.lang.Object
- - org.apache.zookeeper.ClientCnxnSocketNetty

-     public class ClientCnxnSocketNetty
      extends Object

  ClientCnxnSocketNetty implements ClientCnxnSocket abstract methods. It's responsible for connecting to server, reading/writing network traffic and being a layer between network data and higher level packets.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ZKClientConfig` | `clientConfig`
    `protected ByteBuffer` | `incomingBuffer` After the length is read, a new incomingBuffer is allocated in readLength() to receive the full message.
    `protected boolean` | `initialized`
    `protected long` | `lastHeard`
    `protected long` | `lastSend`
    `protected ByteBuffer` | `lenBuffer` This buffer is only used to read the length of the incoming message.
    `protected long` | `now`
    `protected LinkedBlockingDeque<org.apache.zookeeper.ClientCnxn.Packet>` | `outgoingQueue`
    `protected AtomicLong` | `recvCount`
    `protected org.apache.zookeeper.ClientCnxn.SendThread` | `sendThread`
    `protected AtomicLong` | `sentCount`
    `protected long` | `sessionId` The sessionId is only available here for Log and Exception messages.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `initProperties()`

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

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

- - ### Field Detail

    - #### initialized

          protected boolean initialized

    - #### lenBuffer

          protected final ByteBuffer lenBuffer

      This buffer is only used to read the length of the incoming message.

    - #### incomingBuffer

          protected ByteBuffer incomingBuffer

      After the length is read, a new incomingBuffer is allocated in readLength() to receive the full message.

    - #### sentCount

          protected final AtomicLong sentCount

    - #### recvCount

          protected final AtomicLong recvCount

    - #### lastHeard

          protected long lastHeard

    - #### lastSend

          protected long lastSend

    - #### now

          protected long now

    - #### sendThread

          protected org.apache.zookeeper.ClientCnxn.SendThread sendThread

    - #### outgoingQueue

          protected LinkedBlockingDeque<org.apache.zookeeper.ClientCnxn.Packet> outgoingQueue

    - #### clientConfig

          protected ZKClientConfig clientConfig

    - #### sessionId

          protected long sessionId

      The sessionId is only available here for Log and Exception messages. Otherwise the socket doesn't need to know it.

  - ### Method Detail

    - #### initProperties

          protected void initProperties()
                                 throws IOException

      Throws:
        `IOException`

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