Package org.apache.pulsar.client.impl
Class ConnectionHandler
java.lang.Object
org.apache.pulsar.client.impl.ConnectionHandler
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Backoff
protected org.apache.pulsar.client.impl.ConnectionHandler.Connection
protected long
protected final int
protected final org.apache.pulsar.client.impl.HandlerState
-
Constructor Summary
ModifierConstructorDescriptionprotected
ConnectionHandler
(org.apache.pulsar.client.impl.HandlerState state, Backoff backoff, org.apache.pulsar.client.impl.ConnectionHandler.Connection connection) -
Method Summary
Modifier and TypeMethodDescriptioncnx()
void
void
long
getEpoch()
protected void
grabCnx()
protected void
protected void
protected void
setClientCnx
(ClientCnx clientCnx) protected long
switchClientCnx
(ClientCnx clientCnx) Update theClientCnx
for the class, then increment and get the epoch value.
-
Field Details
-
state
protected final org.apache.pulsar.client.impl.HandlerState state -
backoff
-
lastConnectionClosedTimestamp
protected volatile long lastConnectionClosedTimestamp -
randomKeyForSelectConnection
protected final int randomKeyForSelectConnection -
connection
protected org.apache.pulsar.client.impl.ConnectionHandler.Connection connection
-
-
Constructor Details
-
ConnectionHandler
protected ConnectionHandler(org.apache.pulsar.client.impl.HandlerState state, Backoff backoff, org.apache.pulsar.client.impl.ConnectionHandler.Connection connection)
-
-
Method Details
-
grabCnx
protected void grabCnx() -
grabCnx
-
connectionClosed
-
connectionClosed
-
resetBackoff
protected void resetBackoff() -
cnx
-
setClientCnx
-
switchClientCnx
Update theClientCnx
for the class, then increment and get the epoch value. Note that the epoch value is currently only used by theProducerImpl
.- Parameters:
clientCnx
- - the newClientCnx
- Returns:
- the epoch value to use for this pair of
ClientCnx
andProducerImpl
-
getEpoch
public long getEpoch()
-