public static class TimeoutOptions.Builder extends Object
TimeoutOptions.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
TimeoutOptions |
build()
Create a new instance of
TimeoutOptions. |
TimeoutOptions.Builder |
connectionTimeout()
Configure a
TimeoutOptions.TimeoutSource that applies timeouts configured on the connection/client instance. |
TimeoutOptions.Builder |
fixedTimeout(Duration duration)
Set a fixed timeout for all commands.
|
TimeoutOptions.Builder |
relaxedTimeoutsDuringMaintenance(Duration duration)
Enable timeout relaxing during maintenance events.
|
TimeoutOptions.Builder |
timeoutCommands()
Enable command timeouts.
|
TimeoutOptions.Builder |
timeoutCommands(boolean enabled)
Configure whether commands should timeout.
|
TimeoutOptions.Builder |
timeoutSource(TimeoutOptions.TimeoutSource source)
Set a
TimeoutOptions.TimeoutSource to obtain the timeout value per RedisCommand. |
public TimeoutOptions.Builder timeoutCommands()
TimeoutOptions.DEFAULT_TIMEOUT_COMMANDS.thispublic TimeoutOptions.Builder timeoutCommands(boolean enabled)
TimeoutOptions.DEFAULT_TIMEOUT_COMMANDS.enabled - true to enable timeout; false to disable timeouts.thispublic TimeoutOptions.Builder relaxedTimeoutsDuringMaintenance(Duration duration)
ClientOptions.getMaintNotificationsConfig() option, the client would listen to notifications that the current
endpoint is about to go down (as part of some maintenance activity, for example). In such cases, the driver could
extend the existing timeout settings for newly issued commands, or such that are in flight, to make sure they do not
time out during this process. These commands could be either a part of the offline buffer or waiting for a reply.duration - Duration to relax timeouts proactively, must not be null.thisClientOptions.getMaintNotificationsConfig()public TimeoutOptions.Builder fixedTimeout(Duration duration)
duration - the timeout Duration, must not be null.thispublic TimeoutOptions.Builder connectionTimeout()
TimeoutOptions.TimeoutSource that applies timeouts configured on the connection/client instance.thispublic TimeoutOptions.Builder timeoutSource(TimeoutOptions.TimeoutSource source)
TimeoutOptions.TimeoutSource to obtain the timeout value per RedisCommand.source - the timeout source.thispublic TimeoutOptions build()
TimeoutOptions.TimeoutOptionsCopyright © 2025 lettuce.io. All rights reserved.