Module lettuce.core

Class ReconnectAttemptEvent

java.lang.Object
io.lettuce.core.event.connection.ReconnectAttemptEvent
All Implemented Interfaces:
ConnectionId, ConnectionEvent, Event

public class ReconnectAttemptEvent
extends Object
Event fired on reconnect attempts.
Since:
6.1
Author:
Mark Paluch
  • Constructor Details

  • Method Details

    • getAttempt

      public int getAttempt()
      Returns the reconnect attempt counter for the connection. Zero-based counter, 0 represents the first attempt. The counter is reset upon successful reconnect.
      Returns:
      the reconnect attempt counter for the connection. Zero-based counter, 0 represents the first attempt.
    • getDelay

      public Duration getDelay()
    • localAddress

      public SocketAddress localAddress()
      Returns the local address.
      Specified by:
      localAddress in interface ConnectionId
      Returns:
      the local address
    • remoteAddress

      public SocketAddress remoteAddress()
      Returns the remote address.
      Specified by:
      remoteAddress in interface ConnectionId
      Returns:
      the remote address
    • toString

      public String toString()
      Overrides:
      toString in class Object