Class TimeoutValueException

All Implemented Interfaces:
Serializable

public class TimeoutValueException extends TimeoutException
A specialization of TimeoutException that carries a Timeout deadline and the actual value.
Since:
5.0
See Also:
  • Constructor Details

    • TimeoutValueException

      public TimeoutValueException(Timeout deadline, Timeout actual)
      Creates a new exception for the given timeout deadline and actual timeout.
      Parameters:
      deadline - How long was the expected timeout.
      actual - How long we actually waited.
  • Method Details

    • fromMilliseconds

      public static TimeoutValueException fromMilliseconds(long timeoutDeadline, long timeoutActual)
      Creates a new exception for the given timeout deadline and actual timeout.
      Parameters:
      timeoutDeadline - How long was the expected timeout in milliseconds.
      timeoutActual - How long we actually waited in milliseconds.
      Returns:
      a new TimeoutValueException.
    • getActual

      public Timeout getActual()
      Gets how long was the expected timeout in milliseconds.
      Returns:
      how long was the expected timeout in milliseconds.
    • getDeadline

      public Timeout getDeadline()
      Gets how long we actually waited in milliseconds.
      Returns:
      how long we actually waited in milliseconds.