public class ConnectionHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Backoff |
backoff |
protected org.apache.pulsar.client.impl.ConnectionHandler.Connection |
connection |
protected long |
lastConnectionClosedTimestamp |
protected org.apache.pulsar.client.impl.HandlerState |
state |
| Modifier | Constructor and Description |
|---|---|
protected |
ConnectionHandler(org.apache.pulsar.client.impl.HandlerState state,
Backoff backoff,
org.apache.pulsar.client.impl.ConnectionHandler.Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
ClientCnx |
cnx() |
void |
connectionClosed(ClientCnx cnx) |
long |
getEpoch() |
protected void |
grabCnx() |
protected void |
reconnectLater(Throwable exception) |
protected void |
resetBackoff() |
protected void |
setClientCnx(ClientCnx clientCnx) |
protected long |
switchClientCnx(ClientCnx clientCnx)
Update the
ClientCnx for the class, then increment and get the epoch value. |
protected final org.apache.pulsar.client.impl.HandlerState state
protected final Backoff backoff
protected volatile long lastConnectionClosedTimestamp
protected org.apache.pulsar.client.impl.ConnectionHandler.Connection connection
protected ConnectionHandler(org.apache.pulsar.client.impl.HandlerState state, Backoff backoff, org.apache.pulsar.client.impl.ConnectionHandler.Connection connection)
protected void grabCnx()
protected void reconnectLater(Throwable exception)
public void connectionClosed(ClientCnx cnx)
protected void resetBackoff()
public ClientCnx cnx()
protected void setClientCnx(ClientCnx clientCnx)
protected long switchClientCnx(ClientCnx clientCnx)
ClientCnx for the class, then increment and get the epoch value. Note that the epoch value is
currently only used by the ProducerImpl.clientCnx - - the new ClientCnxClientCnx and ProducerImplpublic long getEpoch()
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.