public class TimeoutOptions extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
TimeoutOptions.Builder
Builder for
TimeoutOptions. |
static class |
TimeoutOptions.TimeoutSource
Source for the actual timeout to expire a particular
RedisCommand. |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_TIMEOUT_COMMANDS |
| Modifier and Type | Method and Description |
|---|---|
static TimeoutOptions.Builder |
builder()
Returns a new
TimeoutOptions.Builder to construct TimeoutOptions. |
static TimeoutOptions |
create()
Create a new instance of
TimeoutOptions with default settings. |
static TimeoutOptions |
enabled()
Create a new instance of
TimeoutOptions with enabled timeout applying default connection timeouts. |
static TimeoutOptions |
enabled(Duration timeout)
Create a new instance of
TimeoutOptions with enabled timeout applying a fixed timeout. |
TimeoutOptions.TimeoutSource |
getSource() |
boolean |
isApplyConnectionTimeout() |
boolean |
isTimeoutCommands() |
public static final boolean DEFAULT_TIMEOUT_COMMANDS
public static TimeoutOptions.Builder builder()
TimeoutOptions.Builder to construct TimeoutOptions.TimeoutOptions.Builder to construct TimeoutOptions.public static TimeoutOptions create()
TimeoutOptions with default settings.TimeoutOptions with default settings.public static TimeoutOptions enabled()
TimeoutOptions with enabled timeout applying default connection timeouts.TimeoutOptions with enabled timeout applying default connection timeouts.public static TimeoutOptions enabled(Duration timeout)
TimeoutOptions with enabled timeout applying a fixed timeout.TimeoutOptions with enabled timeout applying a fixed timeout.public boolean isTimeoutCommands()
true if commands should time out.public boolean isApplyConnectionTimeout()
true to apply connection timeouts declared on connection level.public TimeoutOptions.TimeoutSource getSource()
RedisCommand. Can be null if
isTimeoutCommands() is false.Copyright © 2021 lettuce.io. All rights reserved.