diff --git a/pom.xml b/pom.xml
index 0dbefd614c..20c34575a3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -841,6 +841,27 @@
+
+ net.revelc.code.formatter
+ formatter-maven-plugin
+ 2.16.0
+
+
+ ${project.build.sourceDirectory}
+ ${project.build.testSourceDirectory}
+ ${project.basedir}/src/main/templates
+
+ formatting.xml
+
+
+
+
+ validate
+
+
+
+
+
org.apache.maven.pluginsmaven-failsafe-plugin
diff --git a/src/main/java/io/lettuce/core/AbstractRedisClient.java b/src/main/java/io/lettuce/core/AbstractRedisClient.java
index 64ff3d90a5..9adff50624 100644
--- a/src/main/java/io/lettuce/core/AbstractRedisClient.java
+++ b/src/main/java/io/lettuce/core/AbstractRedisClient.java
@@ -305,9 +305,8 @@ protected void channelType(ConnectionBuilder connectionBuilder, ConnectionPoint
LettuceAssert.notNull(connectionPoint, "ConnectionPoint must not be null");
boolean domainSocket = LettuceStrings.isNotEmpty(connectionPoint.getSocket());
- connectionBuilder.bootstrap().group(
- getEventLoopGroup(
- domainSocket ? NativeTransports.eventLoopGroupClass(true) : Transports.eventLoopGroupClass()));
+ connectionBuilder.bootstrap().group(getEventLoopGroup(
+ domainSocket ? NativeTransports.eventLoopGroupClass(true) : Transports.eventLoopGroupClass()));
if (connectionPoint.getSocket() != null) {
NativeTransports.assertDomainSocketAvailable();
diff --git a/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java b/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java
index c0bfab6ab5..16ae6c5796 100644
--- a/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java
+++ b/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java
@@ -1357,7 +1357,7 @@ public Mono hscan(KeyValueStreamingChannel channel, K ke
@Override
public Mono hscanNovalues(KeyStreamingChannel channel, K key, ScanCursor scanCursor,
- ScanArgs scanArgs) {
+ ScanArgs scanArgs) {
return createMono(() -> commandBuilder.hscanNoValuesStreaming(channel, key, scanCursor, scanArgs));
}
@@ -2151,7 +2151,7 @@ public Flux spop(K key, long count) {
public Mono spublish(K shardChannel, V message) {
return createMono(() -> commandBuilder.spublish(shardChannel, message));
}
-
+
@Override
public Mono srandmember(K key) {
return createMono(() -> commandBuilder.srandmember(key));
diff --git a/src/main/java/io/lettuce/core/ChannelGroupListener.java b/src/main/java/io/lettuce/core/ChannelGroupListener.java
index b704f60d89..967e58f935 100644
--- a/src/main/java/io/lettuce/core/ChannelGroupListener.java
+++ b/src/main/java/io/lettuce/core/ChannelGroupListener.java
@@ -67,4 +67,5 @@ private static String getRedisUri(Channel channel) {
private static CommandHandler getCommandHandler(ChannelHandlerContext ctx) {
return ctx.pipeline().get(CommandHandler.class);
}
+
}
diff --git a/src/main/java/io/lettuce/core/ClientOptions.java b/src/main/java/io/lettuce/core/ClientOptions.java
index a8f3eee83b..aa3d2ba188 100644
--- a/src/main/java/io/lettuce/core/ClientOptions.java
+++ b/src/main/java/io/lettuce/core/ClientOptions.java
@@ -97,7 +97,6 @@ public class ClientOptions implements Serializable {
private final TimeoutOptions timeoutOptions;
-
protected ClientOptions(Builder builder) {
this.autoReconnect = builder.autoReconnect;
this.cancelCommandsOnReconnectFailure = builder.cancelCommandsOnReconnectFailure;
@@ -448,11 +447,11 @@ public ClientOptions.Builder mutate() {
builder.autoReconnect(isAutoReconnect()).cancelCommandsOnReconnectFailure(isCancelCommandsOnReconnectFailure())
.decodeBufferPolicy(getDecodeBufferPolicy()).disconnectedBehavior(getDisconnectedBehavior())
- .readOnlyCommands(getReadOnlyCommands())
- .publishOnScheduler(isPublishOnScheduler()).pingBeforeActivateConnection(isPingBeforeActivateConnection())
- .protocolVersion(getConfiguredProtocolVersion()).requestQueueSize(getRequestQueueSize())
- .scriptCharset(getScriptCharset()).socketOptions(getSocketOptions()).sslOptions(getSslOptions())
- .suspendReconnectOnProtocolFailure(isSuspendReconnectOnProtocolFailure()).timeoutOptions(getTimeoutOptions());
+ .readOnlyCommands(getReadOnlyCommands()).publishOnScheduler(isPublishOnScheduler())
+ .pingBeforeActivateConnection(isPingBeforeActivateConnection()).protocolVersion(getConfiguredProtocolVersion())
+ .requestQueueSize(getRequestQueueSize()).scriptCharset(getScriptCharset()).socketOptions(getSocketOptions())
+ .sslOptions(getSslOptions()).suspendReconnectOnProtocolFailure(isSuspendReconnectOnProtocolFailure())
+ .timeoutOptions(getTimeoutOptions());
return builder;
}
diff --git a/src/main/java/io/lettuce/core/CopyArgs.java b/src/main/java/io/lettuce/core/CopyArgs.java
index 2b38787333..33b73c6ea0 100644
--- a/src/main/java/io/lettuce/core/CopyArgs.java
+++ b/src/main/java/io/lettuce/core/CopyArgs.java
@@ -33,75 +33,75 @@
*/
public class CopyArgs implements CompositeArgument {
- private Long destinationDb;
+ private Long destinationDb;
private boolean replace;
- /**
- * Builder entry points for {@link CopyArgs}.
- */
- public static class Builder {
-
- /**
- * Utility constructor.
- */
- private Builder() {
- }
-
- /**
- * Creates new {@link CopyArgs} and sets {@literal DB}.
- *
- * @return new {@link CopyArgs} with {@literal DB} set.
- */
- public static CopyArgs destinationDb(long destinationDb) {
- return new CopyArgs().destinationDb(destinationDb);
- }
-
- /**
- * Creates new {@link CopyArgs} and sets {@literal REPLACE}.
- *
- * @return new {@link CopyArgs} with {@literal REPLACE} set.
- */
- public static CopyArgs replace(boolean replace) {
- return new CopyArgs().replace(replace);
- }
-
- }
-
- /**
- * Specify an alternative logical database index for the destination key.
- *
- * @param destinationDb logical database index to apply for {@literal DB}.
- * @return {@code this}.
- */
- public CopyArgs destinationDb(long destinationDb) {
-
- this.destinationDb = destinationDb;
- return this;
- }
-
- /**
- * Hint redis to remove the destination key before copying the value to it.
- *
- * @param replace remove destination key before copying the value {@literal REPLACE}.
- * @return {@code this}.
- */
- public CopyArgs replace(boolean replace) {
-
- this.replace = replace;
- return this;
- }
+ /**
+ * Builder entry points for {@link CopyArgs}.
+ */
+ public static class Builder {
+
+ /**
+ * Utility constructor.
+ */
+ private Builder() {
+ }
+
+ /**
+ * Creates new {@link CopyArgs} and sets {@literal DB}.
+ *
+ * @return new {@link CopyArgs} with {@literal DB} set.
+ */
+ public static CopyArgs destinationDb(long destinationDb) {
+ return new CopyArgs().destinationDb(destinationDb);
+ }
+
+ /**
+ * Creates new {@link CopyArgs} and sets {@literal REPLACE}.
+ *
+ * @return new {@link CopyArgs} with {@literal REPLACE} set.
+ */
+ public static CopyArgs replace(boolean replace) {
+ return new CopyArgs().replace(replace);
+ }
+
+ }
+
+ /**
+ * Specify an alternative logical database index for the destination key.
+ *
+ * @param destinationDb logical database index to apply for {@literal DB}.
+ * @return {@code this}.
+ */
+ public CopyArgs destinationDb(long destinationDb) {
+
+ this.destinationDb = destinationDb;
+ return this;
+ }
+
+ /**
+ * Hint redis to remove the destination key before copying the value to it.
+ *
+ * @param replace remove destination key before copying the value {@literal REPLACE}.
+ * @return {@code this}.
+ */
+ public CopyArgs replace(boolean replace) {
+
+ this.replace = replace;
+ return this;
+ }
@Override
- public void build(CommandArgs args) {
+ public void build(CommandArgs args) {
- if (destinationDb != null) {
- args.add(CommandKeyword.DB).add(destinationDb);
- }
+ if (destinationDb != null) {
+ args.add(CommandKeyword.DB).add(destinationDb);
+ }
if (replace) {
- args.add(CommandKeyword.REPLACE);
- }
- }
+ args.add(CommandKeyword.REPLACE);
+ }
+ }
}
diff --git a/src/main/java/io/lettuce/core/FlushMode.java b/src/main/java/io/lettuce/core/FlushMode.java
index 9e2f4e5466..98b64dcdb3 100644
--- a/src/main/java/io/lettuce/core/FlushMode.java
+++ b/src/main/java/io/lettuce/core/FlushMode.java
@@ -51,4 +51,5 @@ public enum FlushMode implements ProtocolKeyword {
public byte[] getBytes() {
return bytes;
}
+
}
diff --git a/src/main/java/io/lettuce/core/GeoArgs.java b/src/main/java/io/lettuce/core/GeoArgs.java
index 26ed8120e8..968cdab68e 100644
--- a/src/main/java/io/lettuce/core/GeoArgs.java
+++ b/src/main/java/io/lettuce/core/GeoArgs.java
@@ -266,6 +266,7 @@ public enum Unit implements ProtocolKeyword {
public byte[] getBytes() {
return asBytes;
}
+
}
public void build(CommandArgs args) {
diff --git a/src/main/java/io/lettuce/core/KillArgs.java b/src/main/java/io/lettuce/core/KillArgs.java
index d3a05c3b83..2a71b051d7 100644
--- a/src/main/java/io/lettuce/core/KillArgs.java
+++ b/src/main/java/io/lettuce/core/KillArgs.java
@@ -27,8 +27,8 @@
/**
*
- * Argument list builder for the Redis CLIENT KILL command. Static import the
- * methods from {@link Builder} and chain the method calls: {@code id(1).skipme()}.
+ * Argument list builder for the Redis CLIENT KILL command. Static import
+ * the methods from {@link Builder} and chain the method calls: {@code id(1).skipme()}.
*
* {@link KillArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
@@ -159,6 +159,7 @@ public static KillArgs typeSlave() {
public static KillArgs user(String username) {
return new KillArgs().user(username);
}
+
}
/**
diff --git a/src/main/java/io/lettuce/core/LMoveArgs.java b/src/main/java/io/lettuce/core/LMoveArgs.java
index 35b270db5b..e248063491 100644
--- a/src/main/java/io/lettuce/core/LMoveArgs.java
+++ b/src/main/java/io/lettuce/core/LMoveArgs.java
@@ -89,10 +89,12 @@ public static LMoveArgs rightLeft() {
public static LMoveArgs rightRight() {
return new LMoveArgs(CommandKeyword.RIGHT, CommandKeyword.RIGHT);
}
+
}
@Override
public void build(CommandArgs args) {
args.add(source).add(destination);
}
+
}
diff --git a/src/main/java/io/lettuce/core/MigrateArgs.java b/src/main/java/io/lettuce/core/MigrateArgs.java
index 77af12e6da..22e2d07e80 100644
--- a/src/main/java/io/lettuce/core/MigrateArgs.java
+++ b/src/main/java/io/lettuce/core/MigrateArgs.java
@@ -29,8 +29,8 @@
import io.lettuce.core.protocol.CommandType;
/**
- * Argument list builder for the Redis MIGRATE command. Static import the methods
- * from {@link Builder} and chain the method calls: {@code copy().auth("foobar")}.
+ * Argument list builder for the Redis MIGRATE command. Static import the
+ * methods from {@link Builder} and chain the method calls: {@code copy().auth("foobar")}.
*
* {@link MigrateArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
diff --git a/src/main/java/io/lettuce/core/Range.java b/src/main/java/io/lettuce/core/Range.java
index 12c631efe4..28932159cb 100644
--- a/src/main/java/io/lettuce/core/Range.java
+++ b/src/main/java/io/lettuce/core/Range.java
@@ -261,7 +261,6 @@ public int hashCode() {
return Objects.hash(value, including);
}
-
@Override
public String toString() {
diff --git a/src/main/java/io/lettuce/core/ReadFromImpl.java b/src/main/java/io/lettuce/core/ReadFromImpl.java
index 303fb26054..32295b970f 100644
--- a/src/main/java/io/lettuce/core/ReadFromImpl.java
+++ b/src/main/java/io/lettuce/core/ReadFromImpl.java
@@ -62,6 +62,7 @@ public List select(Nodes nodes) {
return Collections.emptyList();
}
+
}
/**
diff --git a/src/main/java/io/lettuce/core/RedisChannelWriter.java b/src/main/java/io/lettuce/core/RedisChannelWriter.java
index bea2f44683..fbaf1bf0cb 100644
--- a/src/main/java/io/lettuce/core/RedisChannelWriter.java
+++ b/src/main/java/io/lettuce/core/RedisChannelWriter.java
@@ -69,8 +69,8 @@ public interface RedisChannelWriter extends Closeable, AsyncCloseable {
void setConnectionFacade(ConnectionFacade connection);
/**
- * Disable or enable auto-flush behavior. Default is {@code true}. If autoFlushCommands is disabled, multiple commands
- * can be issued without writing them actually to the transport. Commands are buffered until a {@link #flushCommands()} is
+ * Disable or enable auto-flush behavior. Default is {@code true}. If autoFlushCommands is disabled, multiple commands can
+ * be issued without writing them actually to the transport. Commands are buffered until a {@link #flushCommands()} is
* issued. After calling {@link #flushCommands()} commands are sent to the transport and executed by Redis.
*
* @param autoFlush state of autoFlush.
diff --git a/src/main/java/io/lettuce/core/RedisClient.java b/src/main/java/io/lettuce/core/RedisClient.java
index c87497c625..550c5bf104 100644
--- a/src/main/java/io/lettuce/core/RedisClient.java
+++ b/src/main/java/io/lettuce/core/RedisClient.java
@@ -744,28 +744,28 @@ private Mono lookupRedis(RedisURI sentinelUri) {
return Mono.usingWhen(
Mono.fromCompletionStage(() -> connectSentinelAsync(newStringStringCodec(), sentinelUri, timeout)), c -> {
- String sentinelMasterId = sentinelUri.getSentinelMasterId();
- return c.reactive().getMasterAddrByName(sentinelMasterId).map(it -> {
+ String sentinelMasterId = sentinelUri.getSentinelMasterId();
+ return c.reactive().getMasterAddrByName(sentinelMasterId).map(it -> {
- if (it instanceof InetSocketAddress) {
+ if (it instanceof InetSocketAddress) {
- InetSocketAddress isa = (InetSocketAddress) it;
- SocketAddress resolved = getResources().socketAddressResolver()
- .resolve(RedisURI.create(isa.getHostString(), isa.getPort()));
+ InetSocketAddress isa = (InetSocketAddress) it;
+ SocketAddress resolved = getResources().socketAddressResolver()
+ .resolve(RedisURI.create(isa.getHostString(), isa.getPort()));
- logger.debug("Resolved Master {} SocketAddress {}:{} to {}", sentinelMasterId, isa.getHostString(),
- isa.getPort(), resolved);
+ logger.debug("Resolved Master {} SocketAddress {}:{} to {}", sentinelMasterId, isa.getHostString(),
+ isa.getPort(), resolved);
- return resolved;
- }
+ return resolved;
+ }
- return it;
- }).timeout(timeout) //
+ return it;
+ }).timeout(timeout) //
.onErrorMap(e -> {
- RedisCommandTimeoutException ex = ExceptionFactory
- .createTimeoutException("Cannot obtain master using SENTINEL MASTER", timeout);
- ex.addSuppressed(e);
+ RedisCommandTimeoutException ex = ExceptionFactory
+ .createTimeoutException("Cannot obtain master using SENTINEL MASTER", timeout);
+ ex.addSuppressed(e);
return ex;
});
diff --git a/src/main/java/io/lettuce/core/RedisCommandBuilder.java b/src/main/java/io/lettuce/core/RedisCommandBuilder.java
index 9c69d01912..8d74e0deb9 100644
--- a/src/main/java/io/lettuce/core/RedisCommandBuilder.java
+++ b/src/main/java/io/lettuce/core/RedisCommandBuilder.java
@@ -1689,7 +1689,7 @@ Command hscanStreaming(KeyValueStreamingChannel ch
}
Command hscanNoValuesStreaming(KeyStreamingChannel channel, K key, ScanCursor scanCursor,
- ScanArgs scanArgs) {
+ ScanArgs scanArgs) {
notNullKey(key);
notNull(channel);
diff --git a/src/main/java/io/lettuce/core/RedisHandshake.java b/src/main/java/io/lettuce/core/RedisHandshake.java
index a7ccc7a9a6..21fe829bb4 100644
--- a/src/main/java/io/lettuce/core/RedisHandshake.java
+++ b/src/main/java/io/lettuce/core/RedisHandshake.java
@@ -283,13 +283,11 @@ private CompletableFuture applyConnectionMetadata(Channel channel) {
}
if (LettuceStrings.isNotEmpty(metadata.getLibraryName())) {
- postHandshake.add(
- new AsyncCommand<>(this.commandBuilder.clientSetinfo("lib-name", metadata.getLibraryName())));
+ postHandshake.add(new AsyncCommand<>(this.commandBuilder.clientSetinfo("lib-name", metadata.getLibraryName())));
}
if (LettuceStrings.isNotEmpty(metadata.getLibraryVersion())) {
- postHandshake.add(
- new AsyncCommand<>(this.commandBuilder.clientSetinfo("lib-ver", metadata.getLibraryVersion())));
+ postHandshake.add(new AsyncCommand<>(this.commandBuilder.clientSetinfo("lib-ver", metadata.getLibraryVersion())));
}
if (postHandshake.isEmpty()) {
diff --git a/src/main/java/io/lettuce/core/RedisPublisher.java b/src/main/java/io/lettuce/core/RedisPublisher.java
index f19de1fed1..10f87be281 100644
--- a/src/main/java/io/lettuce/core/RedisPublisher.java
+++ b/src/main/java/io/lettuce/core/RedisPublisher.java
@@ -414,7 +414,8 @@ void potentiallyReadMore() {
/*
* getDemand() maybe is Long.MAX_VALUE,because MonoNext.NextSubscriber#request(long n) inner use the Long.MAX_VALUE,
- * so maybe "getDemand() + 1" will be overflow,we use "getDemand() > data.size() - 1" replace the "(getDemand() + 1) > data.size()"
+ * so maybe "getDemand() + 1" will be overflow,we use "getDemand() > data.size() - 1" replace the
+ * "(getDemand() + 1) > data.size()"
*/
if (getDemand() > data.size() - 1) {
state().readData(this);
diff --git a/src/main/java/io/lettuce/core/RestoreArgs.java b/src/main/java/io/lettuce/core/RestoreArgs.java
index ff18ebfe5c..3fac6b9361 100644
--- a/src/main/java/io/lettuce/core/RestoreArgs.java
+++ b/src/main/java/io/lettuce/core/RestoreArgs.java
@@ -27,8 +27,8 @@
import io.lettuce.core.protocol.CommandArgs;
/**
- * Argument list builder for the Redis RESTORE command. Static import the methods
- * from {@link RestoreArgs.Builder} and call the methods: {@code ttl(…)} .
+ * Argument list builder for the Redis RESTORE command. Static import the
+ * methods from {@link RestoreArgs.Builder} and call the methods: {@code ttl(…)} .
*
* {@link RestoreArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
@@ -199,4 +199,5 @@ public void build(CommandArgs args) {
args.add(FREQ).add(frequency);
}
}
+
}
diff --git a/src/main/java/io/lettuce/core/ScanIterator.java b/src/main/java/io/lettuce/core/ScanIterator.java
index 11cec3513e..011eb02dc7 100644
--- a/src/main/java/io/lettuce/core/ScanIterator.java
+++ b/src/main/java/io/lettuce/core/ScanIterator.java
@@ -185,8 +185,7 @@ private MapScanCursor getNextScanCursor(ScanCursor scanCursor) {
};
}
- private static ScanIterator hscanNovalues(RedisHashCommands commands, K key,
- Optional scanArgs) {
+ private static ScanIterator hscanNovalues(RedisHashCommands commands, K key, Optional scanArgs) {
LettuceAssert.notNull(commands, "RedisKeyCommands must not be null");
LettuceAssert.notNull(key, "Key must not be null");
@@ -204,7 +203,8 @@ protected ScanCursor nextScanCursor(ScanCursor scanCursor) {
private KeyScanCursor getNextScanCursor(ScanCursor scanCursor) {
if (scanCursor == null) {
- return scanArgs.map(scanArgs -> commands.hscanNovalues(key, scanArgs)).orElseGet(() -> commands.hscanNovalues(key));
+ return scanArgs.map(scanArgs -> commands.hscanNovalues(key, scanArgs))
+ .orElseGet(() -> commands.hscanNovalues(key));
}
return scanArgs.map((scanArgs) -> commands.hscanNovalues(key, scanCursor, scanArgs))
diff --git a/src/main/java/io/lettuce/core/ScanStream.java b/src/main/java/io/lettuce/core/ScanStream.java
index f9fe147abc..560c22a4a0 100644
--- a/src/main/java/io/lettuce/core/ScanStream.java
+++ b/src/main/java/io/lettuce/core/ScanStream.java
@@ -177,8 +177,7 @@ private static Flux> hscan(RedisHashReactiveCommands
});
}
- private static Flux hscanNovalues(RedisHashReactiveCommands commands, K key,
- Optional scanArgs) {
+ private static Flux hscanNovalues(RedisHashReactiveCommands commands, K key, Optional scanArgs) {
LettuceAssert.notNull(commands, "RedisHashReactiveCommands must not be null");
LettuceAssert.notNull(key, "Key must not be null");
diff --git a/src/main/java/io/lettuce/core/SetArgs.java b/src/main/java/io/lettuce/core/SetArgs.java
index a4a5387829..3f6102f08d 100644
--- a/src/main/java/io/lettuce/core/SetArgs.java
+++ b/src/main/java/io/lettuce/core/SetArgs.java
@@ -29,8 +29,8 @@
import io.lettuce.core.protocol.CommandArgs;
/**
- * Argument list builder for the Redis SET command starting from Redis 2.6.12. Static
- * import the methods from {@link Builder} and chain the method calls: {@code ex(10).nx()}.
+ * Argument list builder for the Redis SET command starting from Redis 2.6.12.
+ * Static import the methods from {@link Builder} and chain the method calls: {@code ex(10).nx()}.
*
* {@link SetArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
diff --git a/src/main/java/io/lettuce/core/ShutdownArgs.java b/src/main/java/io/lettuce/core/ShutdownArgs.java
index 47b134edaf..295f2bd69f 100644
--- a/src/main/java/io/lettuce/core/ShutdownArgs.java
+++ b/src/main/java/io/lettuce/core/ShutdownArgs.java
@@ -91,6 +91,7 @@ public static ShutdownArgs force() {
public static ShutdownArgs abort() {
return new ShutdownArgs().abort();
}
+
}
/**
diff --git a/src/main/java/io/lettuce/core/StrAlgoArgs.java b/src/main/java/io/lettuce/core/StrAlgoArgs.java
index 009f916fd4..2df6daccac 100644
--- a/src/main/java/io/lettuce/core/StrAlgoArgs.java
+++ b/src/main/java/io/lettuce/core/StrAlgoArgs.java
@@ -26,8 +26,8 @@
import io.lettuce.core.protocol.CommandArgs;
/**
- * Argument list builder for the Redis STRALGO command. Static import the methods
- * from {@link StrAlgoArgs.Builder} and call the methods: {@code keys(…)} .
+ * Argument list builder for the Redis STRALGO command. Static import the
+ * methods from {@link StrAlgoArgs.Builder} and call the methods: {@code keys(…)} .
*
* {@link StrAlgoArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
diff --git a/src/main/java/io/lettuce/core/XAutoClaimArgs.java b/src/main/java/io/lettuce/core/XAutoClaimArgs.java
index ad2e45ebee..04408b71e2 100644
--- a/src/main/java/io/lettuce/core/XAutoClaimArgs.java
+++ b/src/main/java/io/lettuce/core/XAutoClaimArgs.java
@@ -212,4 +212,5 @@ public void build(CommandArgs args) {
args.add(CommandKeyword.JUSTID);
}
}
+
}
diff --git a/src/main/java/io/lettuce/core/XTrimArgs.java b/src/main/java/io/lettuce/core/XTrimArgs.java
index 153a8619d4..0e302ad221 100644
--- a/src/main/java/io/lettuce/core/XTrimArgs.java
+++ b/src/main/java/io/lettuce/core/XTrimArgs.java
@@ -24,8 +24,8 @@
import io.lettuce.core.protocol.CommandKeyword;
/**
- * Argument list builder for the Redis XTRIM command. Static import the methods from
- * {@link Builder} and call the methods: {@code maxlen(…)} .
+ * Argument list builder for the Redis XTRIM command. Static import the methods
+ * from {@link Builder} and call the methods: {@code maxlen(…)} .
*
* {@link XTrimArgs} is a mutable object and instances should be used only once to avoid shared mutable state.
*
@@ -76,6 +76,7 @@ public static XTrimArgs maxlen(long count) {
public static XTrimArgs minId(String minid) {
return new XTrimArgs().minId(minid);
}
+
}
/**
diff --git a/src/main/java/io/lettuce/core/api/StatefulConnection.java b/src/main/java/io/lettuce/core/api/StatefulConnection.java
index de403c591a..b318dd4b83 100644
--- a/src/main/java/io/lettuce/core/api/StatefulConnection.java
+++ b/src/main/java/io/lettuce/core/api/StatefulConnection.java
@@ -114,8 +114,8 @@ public interface StatefulConnection extends AutoCloseable, AsyncCloseable
void reset();
/**
- * Disable or enable auto-flush behavior. Default is {@code true}. If autoFlushCommands is disabled, multiple commands
- * can be issued without writing them actually to the transport. Commands are buffered until a {@link #flushCommands()} is
+ * Disable or enable auto-flush behavior. Default is {@code true}. If autoFlushCommands is disabled, multiple commands can
+ * be issued without writing them actually to the transport. Commands are buffered until a {@link #flushCommands()} is
* issued. After calling {@link #flushCommands()} commands are sent to the transport and executed by Redis.
*
* @param autoFlush state of autoFlush.
diff --git a/src/main/java/io/lettuce/core/api/async/RedisAclAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisAclAsyncCommands.java
index 633beffc48..4b76550deb 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisAclAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisAclAsyncCommands.java
@@ -113,8 +113,8 @@ public interface RedisAclAsyncCommands {
RedisFuture> aclList();
/**
- * When Redis is configured to use an ACL file (with the aclfile configuration option), this command
- * will reload the ACLs from the file, replacing all the current ACL rules with the ones defined in the file.
+ * When Redis is configured to use an ACL file (with the aclfile configuration option), this command will reload the ACLs
+ * from the file, replacing all the current ACL rules with the ones defined in the file.
*
* @return String simple-string-reply OK or error message.
*/
@@ -143,8 +143,8 @@ public interface RedisAclAsyncCommands {
RedisFuture aclLogReset();
/**
- * When Redis is configured to use an ACL file (with the aclfile configuration option),
- * this command will save the currently defined ACLs from the server memory to the ACL file.
+ * When Redis is configured to use an ACL file (with the aclfile configuration option), this command will save the currently
+ * defined ACLs from the server memory to the ACL file.
*
* @return String simple-string-reply OK or error message.
*/
@@ -172,4 +172,5 @@ public interface RedisAclAsyncCommands {
* @return K bulk-string-reply the username of the current connection.
*/
RedisFuture aclWhoami();
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisGeoAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisGeoAsyncCommands.java
index 90632b731a..3b834db942 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisGeoAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisGeoAsyncCommands.java
@@ -162,7 +162,8 @@ public interface RedisGeoAsyncCommands {
* @param geoArgs args to control the result.
* @return nested multi-bulk reply. The {@link GeoWithin} contains only fields which were requested by {@link GeoArgs}.
*/
- RedisFuture>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs);
+ RedisFuture>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit,
+ GeoArgs geoArgs);
/**
* Perform a {@link #georadius(Object, double, double, double, GeoArgs.Unit, GeoArgs)} query and store the results in a
@@ -177,7 +178,8 @@ public interface RedisGeoAsyncCommands {
* their locations a sorted set.
* @return Long integer-reply the number of elements in the result.
*/
- RedisFuture georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs geoRadiusStoreArgs);
+ RedisFuture georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit,
+ GeoRadiusStoreArgs geoRadiusStoreArgs);
/**
* Retrieve members selected by distance with the center of {@code member}. The member itself is always contained in the
@@ -216,11 +218,12 @@ public interface RedisGeoAsyncCommands {
* their locations a sorted set.
* @return Long integer-reply the number of elements in the result.
*/
- RedisFuture georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs geoRadiusStoreArgs);
+ RedisFuture georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit,
+ GeoRadiusStoreArgs geoRadiusStoreArgs);
/**
- * Retrieve members selected by distance with the center of {@code reference} the search {@code predicate}.
- * Use {@link GeoSearch} to create reference and predicate objects.
+ * Retrieve members selected by distance with the center of {@code reference} the search {@code predicate}. Use
+ * {@link GeoSearch} to create reference and predicate objects.
*
* @param key the key of the geo set.
* @param reference the reference member or longitude/latitude coordinates.
@@ -231,8 +234,8 @@ public interface RedisGeoAsyncCommands {
RedisFuture> geosearch(K key, GeoSearch.GeoRef reference, GeoSearch.GeoPredicate predicate);
/**
- * Retrieve members selected by distance with the center of {@code reference} the search {@code predicate}.
- * Use {@link GeoSearch} to create reference and predicate objects.
+ * Retrieve members selected by distance with the center of {@code reference} the search {@code predicate}. Use
+ * {@link GeoSearch} to create reference and predicate objects.
*
* @param key the key of the geo set.
* @param reference the reference member or longitude/latitude coordinates.
@@ -241,7 +244,8 @@ public interface RedisGeoAsyncCommands {
* @return nested multi-bulk reply. The {@link GeoWithin} contains only fields which were requested by {@link GeoArgs}.
* @since 6.1
*/
- RedisFuture>> geosearch(K key, GeoSearch.GeoRef reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs);
+ RedisFuture>> geosearch(K key, GeoSearch.GeoRef reference, GeoSearch.GeoPredicate predicate,
+ GeoArgs geoArgs);
/**
* Perform a {@link #geosearch(Object, GeoSearch.GeoRef, GeoSearch.GeoPredicate, GeoArgs)} query and store the results in a
@@ -252,9 +256,12 @@ public interface RedisGeoAsyncCommands {
* @param reference the reference member or longitude/latitude coordinates.
* @param predicate the bounding box or radius to search in.
* @param geoArgs args to control the result.
- * @param storeDist stores the items in a sorted set populated with their distance from the center of the circle or box, as a floating-point number, in the same unit specified for that shape.
+ * @param storeDist stores the items in a sorted set populated with their distance from the center of the circle or box, as
+ * a floating-point number, in the same unit specified for that shape.
* @return Long integer-reply the number of elements in the result.
* @since 6.1
*/
- RedisFuture geosearchstore(K destination, K key, GeoSearch.GeoRef reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs, boolean storeDist);
+ RedisFuture geosearchstore(K destination, K key, GeoSearch.GeoRef reference, GeoSearch.GeoPredicate predicate,
+ GeoArgs geoArgs, boolean storeDist);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisHLLAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisHLLAsyncCommands.java
index c9a8cf9bd5..58b481d1ba 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisHLLAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisHLLAsyncCommands.java
@@ -61,4 +61,5 @@ public interface RedisHLLAsyncCommands {
* The approximated number of unique elements observed via {@code PFADD}.
*/
RedisFuture pfcount(K... keys);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisHashAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisHashAsyncCommands.java
index 9f514450fa..374f9e2348 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisHashAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisHashAsyncCommands.java
@@ -336,7 +336,8 @@ public interface RedisHashAsyncCommands {
* @param scanArgs scan arguments.
* @return StreamScanCursor scan cursor.
*/
- RedisFuture hscan(KeyValueStreamingChannel channel, K key, ScanCursor scanCursor, ScanArgs scanArgs);
+ RedisFuture hscan(KeyValueStreamingChannel channel, K key, ScanCursor scanCursor,
+ ScanArgs scanArgs);
/**
* Incrementally iterate hash fields, without associated values.
@@ -348,7 +349,8 @@ public interface RedisHashAsyncCommands {
* @return StreamScanCursor scan cursor.
* @since 7.0
*/
- RedisFuture hscanNovalues(KeyStreamingChannel channel, K key, ScanCursor scanCursor, ScanArgs scanArgs);
+ RedisFuture hscanNovalues(KeyStreamingChannel channel, K key, ScanCursor scanCursor,
+ ScanArgs scanArgs);
/**
* Incrementally iterate hash fields and associated values.
@@ -581,4 +583,5 @@ public interface RedisHashAsyncCommands {
* associated timeout.
*/
RedisFuture hpersist(K key, K... fields);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisScriptingAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisScriptingAsyncCommands.java
index 76b1fe3f89..1367b489f2 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisScriptingAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisScriptingAsyncCommands.java
@@ -202,4 +202,5 @@ public interface RedisScriptingAsyncCommands {
* @since 6.0
*/
String digest(byte[] script);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisSetAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisSetAsyncCommands.java
index 2caa9bdfdd..9bdc29d90c 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisSetAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisSetAsyncCommands.java
@@ -342,4 +342,5 @@ public interface RedisSetAsyncCommands {
* @return StreamScanCursor scan cursor.
*/
RedisFuture sscan(ValueStreamingChannel channel, K key, ScanCursor scanCursor);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisSortedSetAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisSortedSetAsyncCommands.java
index 6119585764..b1d19e8580 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisSortedSetAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisSortedSetAsyncCommands.java
@@ -489,7 +489,8 @@ public interface RedisSortedSetAsyncCommands {
* Return {@code count} random members from the sorted set stored at {@code key}.
*
* @param key the key.
- * @param count the number of members to return. If the provided count argument is positive, return an array of distinct fields.
+ * @param count the number of members to return. If the provided count argument is positive, return an array of distinct
+ * fields.
* @return List<ScoredValue<V>> array-reply list of scores and elements.
* @since 6.1
*/
@@ -508,7 +509,8 @@ public interface RedisSortedSetAsyncCommands {
* Return {@code count} random members along their value from the sorted set stored at {@code key}.
*
* @param key the key.
- * @param count the number of members to return. If the provided count argument is positive, return an array of distinct fields.
+ * @param count the number of members to return. If the provided count argument is positive, return an array of distinct
+ * fields.
* @return List<ScoredValue<V>> array-reply list of scores and elements.
* @since 6.1
*/
@@ -878,7 +880,8 @@ public interface RedisSortedSetAsyncCommands {
* @deprecated Use {@link #zrangebyscoreWithScores(ScoredValueStreamingChannel, java.lang.Object, Range, Limit limit)}.
*/
@Deprecated
- RedisFuture zrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, double min, double max, long offset, long count);
+ RedisFuture zrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, double min, double max,
+ long offset, long count);
/**
* Stream over a range of members with scores in a sorted set, by score.
@@ -893,7 +896,8 @@ public interface RedisSortedSetAsyncCommands {
* @deprecated Use {@link #zrangebyscoreWithScores(ScoredValueStreamingChannel, java.lang.Object, Range, Limit limit)}.
*/
@Deprecated
- RedisFuture zrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, String min, String max, long offset, long count);
+ RedisFuture zrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, String min, String max,
+ long offset, long count);
/**
* Stream over a range of members with scores in a sorted set, by score.
@@ -905,10 +909,12 @@ public interface RedisSortedSetAsyncCommands {
* @return Long count of elements in the specified score range.
* @since 4.3
*/
- RedisFuture zrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, Range extends Number> range, Limit limit);
+ RedisFuture zrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, Range extends Number> range,
+ Limit limit);
/**
- * Get the specified range of elements in the sorted set stored at {@code srcKey} and stores the result in the {@code dstKey} destination key.
+ * Get the specified range of elements in the sorted set stored at {@code srcKey} and stores the result in the
+ * {@code dstKey} destination key.
*
* @param dstKey the dst key.
* @param srcKey the src key.
@@ -919,7 +925,8 @@ public interface RedisSortedSetAsyncCommands {
RedisFuture zrangestore(K dstKey, K srcKey, Range range);
/**
- * Get the specified range of elements in the sorted set stored at {@code srcKey} and stores the result in the {@code dstKey} destination key.
+ * Get the specified range of elements in the sorted set stored at {@code srcKey} and stores the result in the
+ * {@code dstKey} destination key.
*
* @param dstKey the dst key.
* @param srcKey the src key.
@@ -931,7 +938,8 @@ public interface RedisSortedSetAsyncCommands {
RedisFuture zrangestorebylex(K dstKey, K srcKey, Range extends V> range, Limit limit);
/**
- * Get the specified range of elements in the sorted set stored at {@code srcKey} and stores the result in the {@code dstKey} destination key.
+ * Get the specified range of elements in the sorted set stored at {@code srcKey} and stores the result in the
+ * {@code dstKey} destination key.
*
* @param dstKey the dst key.
* @param srcKey the src key.
@@ -1225,7 +1233,8 @@ public interface RedisSortedSetAsyncCommands {
* @deprecated Use {@link #zrevrangebyscoreWithScores(java.lang.Object, Range, Limit)}.
*/
@Deprecated
- RedisFuture zrevrangebyscore(ValueStreamingChannel channel, K key, double max, double min, long offset, long count);
+ RedisFuture zrevrangebyscore(ValueStreamingChannel channel, K key, double max, double min, long offset,
+ long count);
/**
* Stream over a range of members in a sorted set, by score, with scores ordered from high to low.
@@ -1240,7 +1249,8 @@ public interface RedisSortedSetAsyncCommands {
* @deprecated Use {@link #zrevrangebyscoreWithScores(java.lang.Object, Range, Limit)}.
*/
@Deprecated
- RedisFuture zrevrangebyscore(ValueStreamingChannel channel, K key, String max, String min, long offset, long count);
+ RedisFuture zrevrangebyscore(ValueStreamingChannel channel, K key, String max, String min, long offset,
+ long count);
/**
* Stream over a range of members in a sorted set, by score, with scores ordered from high to low.
@@ -1376,7 +1386,8 @@ public interface RedisSortedSetAsyncCommands {
* @deprecated Use {@link #zrevrangebyscoreWithScores(ScoredValueStreamingChannel, java.lang.Object, Range, Limit)}.
*/
@Deprecated
- RedisFuture zrevrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, double max, double min, long offset, long count);
+ RedisFuture zrevrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, double max, double min,
+ long offset, long count);
/**
* Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.
@@ -1391,7 +1402,8 @@ public interface RedisSortedSetAsyncCommands {
* @deprecated Use {@link #zrevrangebyscoreWithScores(ScoredValueStreamingChannel, java.lang.Object, Range, Limit)}.
*/
@Deprecated
- RedisFuture zrevrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, String max, String min, long offset, long count);
+ RedisFuture zrevrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, String max, String min,
+ long offset, long count);
/**
* Stream over a range of members with scores in a sorted set, by score, with scores ordered from high to low.
@@ -1403,10 +1415,12 @@ public interface RedisSortedSetAsyncCommands {
* @return Long count of elements in the specified range.
* @since 4.3
*/
- RedisFuture zrevrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, Range extends Number> range, Limit limit);
+ RedisFuture zrevrangebyscoreWithScores(ScoredValueStreamingChannel channel, K key, Range extends Number> range,
+ Limit limit);
/**
- * Get the specified range of elements ordered from high to low in the sorted set stored at {@code srcKey} and stores the result in the {@code dstKey} destination key.
+ * Get the specified range of elements ordered from high to low in the sorted set stored at {@code srcKey} and stores the
+ * result in the {@code dstKey} destination key.
*
* @param dstKey the dst key.
* @param srcKey the src key.
@@ -1417,7 +1431,8 @@ public interface RedisSortedSetAsyncCommands {
RedisFuture zrevrangestore(K dstKey, K srcKey, Range range);
/**
- * Get the lexicographical range ordered from high to low of elements in the sorted set stored at {@code srcKey} and stores the result in the {@code dstKey} destination key.
+ * Get the lexicographical range ordered from high to low of elements in the sorted set stored at {@code srcKey} and stores
+ * the result in the {@code dstKey} destination key.
*
* @param dstKey the src key.
* @param srcKey the dst key.
@@ -1429,9 +1444,11 @@ public interface RedisSortedSetAsyncCommands {
RedisFuture zrevrangestorebylex(K dstKey, K srcKey, Range extends V> range, Limit limit);
/**
- * Get the specified range of elements in the sorted set stored at {@code srcKey with scores ordered from high to low and stores the result in the {@code dstKey} destination key.
+ * Get the specified range of elements in the sorted set stored at {@code srcKey with scores ordered from high to low and
+ * stores the result in the {@code dstKey} destination key.
*
* @param dstKey the src key.
+ *
* @param srcKey the dst key.
* @param range the score range.
* @param limit the limit to apply.
@@ -1524,7 +1541,8 @@ public interface RedisSortedSetAsyncCommands {
* @param scanArgs scan arguments.
* @return StreamScanCursor scan cursor.
*/
- RedisFuture zscan(ScoredValueStreamingChannel channel, K key, ScanCursor scanCursor, ScanArgs scanArgs);
+ RedisFuture zscan(ScoredValueStreamingChannel channel, K key, ScanCursor scanCursor,
+ ScanArgs scanArgs);
/**
* Incrementally iterate sorted sets elements and associated scores.
@@ -1602,4 +1620,5 @@ public interface RedisSortedSetAsyncCommands {
* @return Long integer-reply the number of elements in the resulting sorted set at {@code destination}.
*/
RedisFuture zunionstore(K destination, ZStoreArgs storeArgs, K... keys);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisStreamAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisStreamAsyncCommands.java
index df6e81e1e7..317f02a195 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisStreamAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisStreamAsyncCommands.java
@@ -368,4 +368,5 @@ public interface RedisStreamAsyncCommands {
* @since 6.1
*/
RedisFuture xtrim(K key, XTrimArgs args);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisStringAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisStringAsyncCommands.java
index c3ea91fb92..1e5b1d3d05 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisStringAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisStringAsyncCommands.java
@@ -433,4 +433,5 @@ public interface RedisStringAsyncCommands {
* @return Long integer-reply the length of the string at {@code key}, or {@code 0} when {@code key} does not exist.
*/
RedisFuture strlen(K key);
+
}
diff --git a/src/main/java/io/lettuce/core/api/async/RedisTransactionalAsyncCommands.java b/src/main/java/io/lettuce/core/api/async/RedisTransactionalAsyncCommands.java
index 4378632c49..3c6d25adea 100644
--- a/src/main/java/io/lettuce/core/api/async/RedisTransactionalAsyncCommands.java
+++ b/src/main/java/io/lettuce/core/api/async/RedisTransactionalAsyncCommands.java
@@ -72,4 +72,5 @@ public interface RedisTransactionalAsyncCommands {
* @return String simple-string-reply always {@code OK}.
*/
RedisFuture unwatch();
+
}
diff --git a/src/main/java/io/lettuce/core/api/reactive/BaseRedisReactiveCommands.java b/src/main/java/io/lettuce/core/api/reactive/BaseRedisReactiveCommands.java
index 24d9989efa..43fd4ec538 100644
--- a/src/main/java/io/lettuce/core/api/reactive/BaseRedisReactiveCommands.java
+++ b/src/main/java/io/lettuce/core/api/reactive/BaseRedisReactiveCommands.java
@@ -79,7 +79,7 @@ public interface BaseRedisReactiveCommands {
Flux pubsubShardChannels();
/**
- * Lists the currently *active shard channels*.
+ * Lists the currently *active shard channels*.
*
* @param pattern the pattern type: patternkey (pattern).
* @return K array-reply a list of active channels, optionally matching the specified pattern.
@@ -123,8 +123,8 @@ public interface BaseRedisReactiveCommands {
/**
* Return the role of the instance in the context of replication.
*
- * @return Object array-reply where the first element is one of master, slave, sentinel and the additional
- * elements are role-specific.
+ * @return Object array-reply where the first element is one of master, slave, sentinel and the additional elements are
+ * role-specific.
*/
Flux