Package org.apache.zookeeper
Class ClientCnxnSocketNetty
- java.lang.Object
-
- org.apache.zookeeper.ClientCnxnSocketNetty
-
public class ClientCnxnSocketNetty extends java.lang.ObjectClientCnxnSocketNetty 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 Description protected ZKClientConfigclientConfigprotected java.nio.ByteBufferincomingBufferAfter the length is read, a new incomingBuffer is allocated in readLength() to receive the full message.protected booleaninitializedprotected longlastHeardprotected longlastSendprotected java.nio.ByteBufferlenBufferThis buffer is only used to read the length of the incoming message.protected longnowprotected java.util.concurrent.LinkedBlockingDeque<org.apache.zookeeper.ClientCnxn.Packet>outgoingQueueprotected java.util.concurrent.atomic.AtomicLongrecvCountprotected org.apache.zookeeper.ClientCnxn.SendThreadsendThreadprotected java.util.concurrent.atomic.AtomicLongsentCountprotected longsessionIdThe sessionId is only available here for Log and Exception messages.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitProperties()
-
-
-
Field Detail
-
initialized
protected boolean initialized
-
lenBuffer
protected final java.nio.ByteBuffer lenBuffer
This buffer is only used to read the length of the incoming message.
-
incomingBuffer
protected java.nio.ByteBuffer incomingBuffer
After the length is read, a new incomingBuffer is allocated in readLength() to receive the full message.
-
sentCount
protected final java.util.concurrent.atomic.AtomicLong sentCount
-
recvCount
protected final java.util.concurrent.atomic.AtomicLong recvCount
-
lastHeard
protected long lastHeard
-
lastSend
protected long lastSend
-
now
protected long now
-
sendThread
protected org.apache.zookeeper.ClientCnxn.SendThread sendThread
-
outgoingQueue
protected java.util.concurrent.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.
-
-