java.lang.Object
io.lettuce.core.TimeoutOptions.TimeoutSource
- Enclosing class:
- TimeoutOptions
public abstract static class TimeoutOptions.TimeoutSource extends Object
Source for the actual timeout to expire a particular
RedisCommand.-
Constructor Summary
Constructors Constructor Description TimeoutSource() -
Method Summary
Modifier and Type Method Description abstract longgetTimeout(RedisCommand<?,?,?> command)Obtains the timeout for aRedisCommand.TimeUnitgetTimeUnit()
-
Constructor Details
-
TimeoutSource
public TimeoutSource()
-
-
Method Details
-
getTimeout
Obtains the timeout for aRedisCommand. All timeouts must be specified ingetTimeUnit(). Values greater zero will timeout the command. Values less or equal to zero do not timeout the command.commandmay 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 benull.- Returns:
- the timeout value. Zero disables the timeout. A value of
-1applies the default timeout configured on the connection.
-
getTimeUnit
- Returns:
- the
TimeUnitfor the timeout.
-