diff --git a/src/main/java/io/lettuce/core/ShutdownArgs.java b/src/main/java/io/lettuce/core/ShutdownArgs.java
index 18fa24d35c..1a2ef41e08 100644
--- a/src/main/java/io/lettuce/core/ShutdownArgs.java
+++ b/src/main/java/io/lettuce/core/ShutdownArgs.java
@@ -19,13 +19,13 @@
import io.lettuce.core.protocol.CommandKeyword;
/**
- * Argument list builder for the Redis SHUTDOWN command. Static import the methods from
- * {@link Builder} and call the methods: {@code now(…)} .
+ * Argument list builder for the Redis SHUTDOWN command. Static import the
+ * methods from {@link Builder} and call the methods: {@code now(…)} .
*
* {@link ShutdownArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
* @author dengliming
- * @since 7.0
+ * @since 6.2
*/
public class ShutdownArgs implements CompositeArgument {
@@ -112,7 +112,7 @@ public ShutdownArgs now() {
}
/**
- * Ignores any errors that would normally prevent the server from exiting. For details, see the following section.
+ * Ignores any errors that would normally prevent the server from exiting.
*
* @return {@code this}
*/
@@ -146,7 +146,7 @@ public void build(CommandArgs args) {
args.add("NOW");
}
if (force) {
- args.add("FORCE");
+ args.add(CommandKeyword.FORCE);
}
if (abort) {
args.add("ABORT");
diff --git a/src/main/java/io/lettuce/core/api/async/RedisServerAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisServerAsyncCommands.java
index 897a913c3e..27ed0f041f 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisServerAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisServerAsyncCommands.java
@@ -391,6 +391,7 @@ public interface RedisServerAsyncCommands {
* Synchronously save the dataset to disk and then shutdown the server.
*
* @param args
+ * @since 6.2
*/
void shutdown(ShutdownArgs args);
diff --git a/src/main/java/io/lettuce/core/api/reactive/RedisServerReactiveCommands.java b/src/main/java/io/lettuce/core/api/reactive/RedisServerReactiveCommands.java
index 6bf190e7f1..826e45aeb5 100644
--- a/src/main/java/io/lettuce/core/api/reactive/RedisServerReactiveCommands.java
+++ b/src/main/java/io/lettuce/core/api/reactive/RedisServerReactiveCommands.java
@@ -18,11 +18,11 @@
import java.util.Date;
import java.util.Map;
-import io.lettuce.core.ShutdownArgs;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import io.lettuce.core.FlushMode;
import io.lettuce.core.KillArgs;
+import io.lettuce.core.ShutdownArgs;
import io.lettuce.core.TrackingArgs;
import io.lettuce.core.UnblockType;
import io.lettuce.core.protocol.CommandType;
@@ -391,6 +391,7 @@ public interface RedisServerReactiveCommands {
* Synchronously save the dataset to disk and then shutdown the server.
*
* @param args
+ * @since 6.2
*/
Mono shutdown(ShutdownArgs args);
diff --git a/src/main/java/io/lettuce/core/api/sync/RedisServerCommands.java b/src/main/java/io/lettuce/core/api/sync/RedisServerCommands.java
index 0c77748905..09cdb7a586 100644
--- a/src/main/java/io/lettuce/core/api/sync/RedisServerCommands.java
+++ b/src/main/java/io/lettuce/core/api/sync/RedisServerCommands.java
@@ -390,6 +390,7 @@ public interface RedisServerCommands {
* Synchronously save the dataset to disk and then shutdown the server.
*
* @param args
+ * @since 6.2
*/
void shutdown(ShutdownArgs args);
diff --git a/src/main/templates/io/lettuce/core/api/RedisServerCommands.java b/src/main/templates/io/lettuce/core/api/RedisServerCommands.java
index 85a483ce80..75b8de57af 100644
--- a/src/main/templates/io/lettuce/core/api/RedisServerCommands.java
+++ b/src/main/templates/io/lettuce/core/api/RedisServerCommands.java
@@ -388,6 +388,7 @@ public interface RedisServerCommands {
* Synchronously save the dataset to disk and then shutdown the server.
*
* @param args
+ * @since 6.2
*/
void shutdown(ShutdownArgs args);
diff --git a/src/test/java/io/lettuce/core/commands/ServerCommandIntegrationTests.java b/src/test/java/io/lettuce/core/commands/ServerCommandIntegrationTests.java
index c554adeae2..67b97e842b 100644
--- a/src/test/java/io/lettuce/core/commands/ServerCommandIntegrationTests.java
+++ b/src/test/java/io/lettuce/core/commands/ServerCommandIntegrationTests.java
@@ -27,7 +27,6 @@
import javax.inject.Inject;
-import io.lettuce.core.ShutdownArgs;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -40,6 +39,7 @@
import io.lettuce.core.KillArgs;
import io.lettuce.core.RedisClient;
import io.lettuce.core.RedisFuture;
+import io.lettuce.core.ShutdownArgs;
import io.lettuce.core.TestSupport;
import io.lettuce.core.TrackingArgs;
import io.lettuce.core.UnblockType;
@@ -70,6 +70,7 @@
public class ServerCommandIntegrationTests extends TestSupport {
private final RedisClient client;
+
private final RedisCommands redis;
@Inject
@@ -518,7 +519,7 @@ void swapdb() {
}
@Test
- @Disabled("Run me manually") // Redis 7.0
+ @Disabled("Run me manually") // Redis 7.0
void shutdown() {
redis.shutdown(new ShutdownArgs().save(true).now());
}
@@ -529,4 +530,5 @@ private boolean noSaveInProgress() {
return !info.contains("aof_rewrite_in_progress:1") && !info.contains("rdb_bgsave_in_progress:1");
}
+
}