Package io.lettuce.core
Class ShutdownArgs
- java.lang.Object
-
- io.lettuce.core.ShutdownArgs
-
- All Implemented Interfaces:
CompositeArgument
public class ShutdownArgs extends Object implements CompositeArgument
Argument list builder for the Redis SHUTDOWN command. Static import the methods fromShutdownArgs.Builder
and call the methods:now(…)
.ShutdownArgs
is a mutable object and instances should be used only once to avoid shared mutable state.- Since:
- 6.2
- Author:
- dengliming
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShutdownArgs.Builder
Builder entry points forShutdownArgs
.
-
Constructor Summary
Constructors Constructor Description ShutdownArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShutdownArgs
abort()
Cancels an ongoing shutdown and cannot be combined with other flags.<K,V>
voidbuild(CommandArgs<K,V> args)
Build command arguments and contribute arguments toCommandArgs
.ShutdownArgs
force()
Ignores any errors that would normally prevent the server from exiting.ShutdownArgs
now()
Skips waiting for lagging replicas, i.e.ShutdownArgs
save(boolean save)
Will force a DB saving operation even if no save points are configured.
-
-
-
Method Detail
-
save
public ShutdownArgs save(boolean save)
Will force a DB saving operation even if no save points are configured.- Parameters:
save
-true
force save operation.- Returns:
this
-
now
public ShutdownArgs now()
Skips waiting for lagging replicas, i.e. it bypasses the first step in the shutdown sequence.- Returns:
this
-
force
public ShutdownArgs force()
Ignores any errors that would normally prevent the server from exiting.- Returns:
this
-
abort
public ShutdownArgs abort()
Cancels an ongoing shutdown and cannot be combined with other flags.- Returns:
this
-
build
public <K,V> void build(CommandArgs<K,V> args)
Description copied from interface:CompositeArgument
Build command arguments and contribute arguments toCommandArgs
.Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
- Specified by:
build
in interfaceCompositeArgument
- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
args
- the command arguments, must not benull
.
-
-