类 ConnectionHandler

java.lang.Object
org.apache.pulsar.client.impl.ConnectionHandler

public class ConnectionHandler extends Object
  • 字段详细资料

    • state

      protected final org.apache.pulsar.client.impl.HandlerState state
    • backoff

      protected final Backoff backoff
    • lastConnectionClosedTimestamp

      protected volatile long lastConnectionClosedTimestamp
    • randomKeyForSelectConnection

      protected final int randomKeyForSelectConnection
    • connection

      protected org.apache.pulsar.client.impl.ConnectionHandler.Connection connection
  • 构造器详细资料

    • ConnectionHandler

      protected ConnectionHandler(org.apache.pulsar.client.impl.HandlerState state, Backoff backoff, org.apache.pulsar.client.impl.ConnectionHandler.Connection connection)
  • 方法详细资料

    • grabCnx

      protected void grabCnx()
    • grabCnx

      protected void grabCnx(Optional<URI> hostURI)
    • connectionClosed

      public void connectionClosed(ClientCnx cnx)
    • connectionClosed

      public void connectionClosed(ClientCnx cnx, Optional<Long> initialConnectionDelayMs, Optional<URI> hostUrl)
    • resetBackoff

      protected void resetBackoff()
    • cnx

      public ClientCnx cnx()
    • setClientCnx

      protected void setClientCnx(ClientCnx clientCnx)
    • switchClientCnx

      protected long switchClientCnx(ClientCnx clientCnx)
      Update the 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 ClientCnx
      返回:
      the epoch value to use for this pair of ClientCnx and ProducerImpl
    • getEpoch

      public long getEpoch()