Class Timeout


  • public class Timeout
    extends Object
    Timeout value object to represent a timeout value with its TimeUnit.
    Since:
    5.0
    Author:
    Mark Paluch
    See Also:
    Command
    • Method Detail

      • create

        public static Timeout create​(Duration timeout)
        Create a Timeout.
        Parameters:
        timeout - the timeout value, must be non-negative.
        Returns:
        the Timeout.
      • create

        public static Timeout create​(long timeout,
                                     TimeUnit timeUnit)
        Create a Timeout.
        Parameters:
        timeout - the timeout value, must be non-negative.
        timeUnit - the associated TimeUnit, must not be null.
        Returns:
        the Timeout.
      • getTimeout

        public Duration getTimeout()
        Returns:
        the timeout value.