diff --git a/java/client/src/main/java/glide/api/BaseClient.java b/java/client/src/main/java/glide/api/BaseClient.java index 4301afbbf0..b29a78df0d 100644 --- a/java/client/src/main/java/glide/api/BaseClient.java +++ b/java/client/src/main/java/glide/api/BaseClient.java @@ -2,17 +2,15 @@ package glide.api; import static glide.ffi.resolvers.SocketListenerResolver.getSocket; -import static redis_request.RedisRequestOuterClass.RequestType.Expire; -import static redis_request.RedisRequestOuterClass.RequestType.ExpireAt; import static glide.utils.ArrayTransformUtils.castArray; import static glide.utils.ArrayTransformUtils.convertMapToArgArray; import static redis_request.RedisRequestOuterClass.RequestType.Decr; import static redis_request.RedisRequestOuterClass.RequestType.DecrBy; import static redis_request.RedisRequestOuterClass.RequestType.Del; import static redis_request.RedisRequestOuterClass.RequestType.Exists; +import static redis_request.RedisRequestOuterClass.RequestType.Expire; +import static redis_request.RedisRequestOuterClass.RequestType.ExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.GetString; -import static redis_request.RedisRequestOuterClass.RequestType.PExpire; -import static redis_request.RedisRequestOuterClass.RequestType.PExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.HashDel; import static redis_request.RedisRequestOuterClass.RequestType.HashExists; import static redis_request.RedisRequestOuterClass.RequestType.HashGet; @@ -26,6 +24,8 @@ import static redis_request.RedisRequestOuterClass.RequestType.IncrByFloat; import static redis_request.RedisRequestOuterClass.RequestType.MGet; import static redis_request.RedisRequestOuterClass.RequestType.MSet; +import static redis_request.RedisRequestOuterClass.RequestType.PExpire; +import static redis_request.RedisRequestOuterClass.RequestType.PExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.Ping; import static redis_request.RedisRequestOuterClass.RequestType.SAdd; import static redis_request.RedisRequestOuterClass.RequestType.SCard; @@ -37,7 +37,6 @@ import glide.api.commands.ConnectionManagementCommands; import glide.api.commands.GenericBaseCommands; -import glide.api.commands.GenericBaseCommands; import glide.api.commands.HashCommands; import glide.api.commands.SetCommands; import glide.api.commands.StringCommands; diff --git a/java/client/src/main/java/glide/api/commands/GenericBaseCommands.java b/java/client/src/main/java/glide/api/commands/GenericBaseCommands.java index 2ae9cc3333..38d484f7b9 100644 --- a/java/client/src/main/java/glide/api/commands/GenericBaseCommands.java +++ b/java/client/src/main/java/glide/api/commands/GenericBaseCommands.java @@ -229,7 +229,7 @@ public interface GenericBaseCommands { * */ CompletableFuture pexpireAt( - String key, long unixMilliseconds, ExpireOptions expireOptions); + String key, long unixMilliseconds, ExpireOptions expireOptions); /** * Returns the remaining time to live of key that has a timeout. diff --git a/java/client/src/test/java/glide/api/RedisClientTest.java b/java/client/src/test/java/glide/api/RedisClientTest.java index 78da6e9204..8c5b0a309d 100644 --- a/java/client/src/test/java/glide/api/RedisClientTest.java +++ b/java/client/src/test/java/glide/api/RedisClientTest.java @@ -32,10 +32,10 @@ import static redis_request.RedisRequestOuterClass.RequestType.IncrBy; import static redis_request.RedisRequestOuterClass.RequestType.IncrByFloat; import static redis_request.RedisRequestOuterClass.RequestType.Info; -import static redis_request.RedisRequestOuterClass.RequestType.PExpire; -import static redis_request.RedisRequestOuterClass.RequestType.PExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.MGet; import static redis_request.RedisRequestOuterClass.RequestType.MSet; +import static redis_request.RedisRequestOuterClass.RequestType.PExpire; +import static redis_request.RedisRequestOuterClass.RequestType.PExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.Ping; import static redis_request.RedisRequestOuterClass.RequestType.SAdd; import static redis_request.RedisRequestOuterClass.RequestType.SCard; diff --git a/java/client/src/test/java/glide/api/models/ClusterTransactionTests.java b/java/client/src/test/java/glide/api/models/ClusterTransactionTests.java deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/java/client/src/test/java/glide/api/models/TransactionTests.java b/java/client/src/test/java/glide/api/models/TransactionTests.java index 0899d50bd2..ff4e824bc6 100644 --- a/java/client/src/test/java/glide/api/models/TransactionTests.java +++ b/java/client/src/test/java/glide/api/models/TransactionTests.java @@ -3,12 +3,12 @@ import static glide.api.models.commands.SetOptions.RETURN_OLD_VALUE; import static org.junit.jupiter.api.Assertions.assertEquals; -import static redis_request.RedisRequestOuterClass.RequestType.Expire; -import static redis_request.RedisRequestOuterClass.RequestType.ExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.Decr; import static redis_request.RedisRequestOuterClass.RequestType.DecrBy; import static redis_request.RedisRequestOuterClass.RequestType.Del; import static redis_request.RedisRequestOuterClass.RequestType.Exists; +import static redis_request.RedisRequestOuterClass.RequestType.Expire; +import static redis_request.RedisRequestOuterClass.RequestType.ExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.GetString; import static redis_request.RedisRequestOuterClass.RequestType.HashDel; import static redis_request.RedisRequestOuterClass.RequestType.HashExists; @@ -22,10 +22,10 @@ import static redis_request.RedisRequestOuterClass.RequestType.IncrBy; import static redis_request.RedisRequestOuterClass.RequestType.IncrByFloat; import static redis_request.RedisRequestOuterClass.RequestType.Info; -import static redis_request.RedisRequestOuterClass.RequestType.PExpire; -import static redis_request.RedisRequestOuterClass.RequestType.PExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.MGet; import static redis_request.RedisRequestOuterClass.RequestType.MSet; +import static redis_request.RedisRequestOuterClass.RequestType.PExpire; +import static redis_request.RedisRequestOuterClass.RequestType.PExpireAt; import static redis_request.RedisRequestOuterClass.RequestType.Ping; import static redis_request.RedisRequestOuterClass.RequestType.SAdd; import static redis_request.RedisRequestOuterClass.RequestType.SCard; @@ -157,63 +157,63 @@ public void transaction_builds_protobuf_request(BaseTransaction transaction) transaction.expire("key", 9L); results.add( - Pair.of(Expire, ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(9L)).build())); + Pair.of(Expire, ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(9L)).build())); transaction.expire("key", 99L, ExpireOptions.NEW_EXPIRY_GREATER_THAN_CURRENT); results.add( - Pair.of( - Expire, - ArgsArray.newBuilder() - .addArgs("key") - .addArgs(Long.toString(99L)) - .addArgs("GT") - .build())); + Pair.of( + Expire, + ArgsArray.newBuilder() + .addArgs("key") + .addArgs(Long.toString(99L)) + .addArgs("GT") + .build())); transaction.expireAt("key", 999L); results.add( - Pair.of( - ExpireAt, ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(999L)).build())); + Pair.of( + ExpireAt, ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(999L)).build())); transaction.expireAt("key", 9999L, ExpireOptions.NEW_EXPIRY_LESS_THAN_CURRENT); results.add( - Pair.of( - ExpireAt, - ArgsArray.newBuilder() - .addArgs("key") - .addArgs(Long.toString(9999L)) - .addArgs("LT") - .build())); + Pair.of( + ExpireAt, + ArgsArray.newBuilder() + .addArgs("key") + .addArgs(Long.toString(9999L)) + .addArgs("LT") + .build())); transaction.pexpire("key", 99999L); results.add( - Pair.of( - PExpire, ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(99999L)).build())); + Pair.of( + PExpire, ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(99999L)).build())); transaction.pexpire("key", 999999L, ExpireOptions.HAS_EXISTING_EXPIRY); results.add( - Pair.of( - PExpire, - ArgsArray.newBuilder() - .addArgs("key") - .addArgs(Long.toString(999999L)) - .addArgs("XX") - .build())); + Pair.of( + PExpire, + ArgsArray.newBuilder() + .addArgs("key") + .addArgs(Long.toString(999999L)) + .addArgs("XX") + .build())); transaction.pexpireAt("key", 9999999L); results.add( - Pair.of( - PExpireAt, - ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(9999999L)).build())); + Pair.of( + PExpireAt, + ArgsArray.newBuilder().addArgs("key").addArgs(Long.toString(9999999L)).build())); transaction.pexpireAt("key", 99999999L, ExpireOptions.HAS_NO_EXPIRY); results.add( - Pair.of( - PExpireAt, - ArgsArray.newBuilder() - .addArgs("key") - .addArgs(Long.toString(99999999L)) - .addArgs("NX") - .build())); + Pair.of( + PExpireAt, + ArgsArray.newBuilder() + .addArgs("key") + .addArgs(Long.toString(99999999L)) + .addArgs("NX") + .build())); transaction.ttl("key"); results.add(Pair.of(TTL, ArgsArray.newBuilder().addArgs("key").build())); diff --git a/java/integTest/src/test/java/glide/SharedCommandTests.java b/java/integTest/src/test/java/glide/SharedCommandTests.java index c7f547dff2..d3f8fda5db 100644 --- a/java/integTest/src/test/java/glide/SharedCommandTests.java +++ b/java/integTest/src/test/java/glide/SharedCommandTests.java @@ -24,10 +24,9 @@ import glide.api.models.configuration.NodeAddress; import glide.api.models.configuration.RedisClientConfiguration; import glide.api.models.configuration.RedisClusterClientConfiguration; -import java.time.Instant; import glide.api.models.exceptions.RequestException; +import java.time.Instant; import java.util.List; -import java.util.UUID; import java.util.Map; import java.util.Set; import java.util.UUID;