Module lettuce.core

Class ReconnectFailedEvent

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

public class ReconnectFailedEvent
extends Object
Event fired on failed reconnect caused either by I/O issues or during connection initialization.
Since:
5.2
Author:
Mark Paluch
  • Constructor Details

  • Method Details

    • getCause

      public Throwable getCause()
      Returns the Throwable that describes the reconnect cause.
      Returns:
      the Throwable that describes the reconnect cause.
    • 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.
    • 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