Class ServerHeartbeatFailedEvent


  • public final class ServerHeartbeatFailedEvent
    extends Object
    An event for server heartbeat failures.
    Since:
    3.3
    • Constructor Detail

      • ServerHeartbeatFailedEvent

        public ServerHeartbeatFailedEvent(ConnectionId connectionId,
                                          long elapsedTimeNanos,
                                          Throwable throwable)
        Construct an instance.
        Parameters:
        connectionId - the non-null connectionId
        elapsedTimeNanos - the non-negative elapsed time in nanoseconds
        throwable - the non-null exception that caused the failure
    • Method Detail

      • getConnectionId

        public ConnectionId getConnectionId()
        Gets the connectionId.
        Returns:
        the connectionId
      • getElapsedTime

        public long getElapsedTime(TimeUnit timeUnit)
        Gets the elapsed time in the given time unit.
        Parameters:
        timeUnit - the non-null timeUnit
        Returns:
        the elapsed time in the given time unit
      • getThrowable

        public Throwable getThrowable()
        Gets the exceptions that caused the failure
        Returns:
        the exception