Class TimeoutOptions.TimeoutSource

  • Enclosing class:
    TimeoutOptions

    public abstract static class TimeoutOptions.TimeoutSource
    extends Object
    Source for the actual timeout to expire a particular RedisCommand.
    • Constructor Detail

      • TimeoutSource

        public TimeoutSource()
    • Method Detail

      • getTimeout

        public abstract long getTimeout​(RedisCommand<?,​?,​?> command)
        Obtains the timeout for a RedisCommand. All timeouts must be specified in getTimeUnit(). Values greater zero will timeout the command. Values less or equal to zero do not timeout the command.

        command may be null if a timeout is required but the command is not yet known, e.g. when the timeout is required but a connect did not finish yet.

        Parameters:
        command - can be null.
        Returns:
        the timeout value. Zero disables the timeout. A value of -1 applies the default timeout configured on the connection.
      • getTimeUnit

        public TimeUnit getTimeUnit()
        Returns:
        the TimeUnit for the timeout.