Module lettuce.core

Class Timeout

java.lang.Object
io.lettuce.core.dynamic.domain.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 Details

    • 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.