Package io.lettuce.core
Class TimeoutOptions.TimeoutSource
- 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 particularRedisCommand
.
-
-
Constructor Summary
Constructors Constructor Description TimeoutSource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract long
getTimeout(RedisCommand<?,?,?> command)
Obtains the timeout for aRedisCommand
.TimeUnit
getTimeUnit()
-
-
-
Method Detail
-
getTimeout
public abstract long getTimeout(RedisCommand<?,?,?> command)
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.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 benull
.- Returns:
- the timeout value. Zero disables the timeout. A value of
-1
applies the default timeout configured on the connection.
-
-