diff --git a/src/main/java/redis/clients/jedis/PipeliningBase.java b/src/main/java/redis/clients/jedis/PipeliningBase.java index e9b6d49b73..62b773cdab 100644 --- a/src/main/java/redis/clients/jedis/PipeliningBase.java +++ b/src/main/java/redis/clients/jedis/PipeliningBase.java @@ -786,7 +786,7 @@ public Response> sdiff(String... keys) { } @Override - public Response sdiffStore(String dstKey, String... keys) { + public Response sdiffstore(String dstKey, String... keys) { return appendCommand(commandObjects.sdiffstore(dstKey, keys)); } diff --git a/src/main/java/redis/clients/jedis/commands/SetPipelineCommands.java b/src/main/java/redis/clients/jedis/commands/SetPipelineCommands.java index 4d915e31e7..948c04ad69 100644 --- a/src/main/java/redis/clients/jedis/commands/SetPipelineCommands.java +++ b/src/main/java/redis/clients/jedis/commands/SetPipelineCommands.java @@ -37,7 +37,15 @@ default Response> sscan(String key, String cursor) { Response> sdiff(String... keys); - Response sdiffStore(String dstKey, String... keys); + Response sdiffstore(String dstKey, String... keys); + + /** + * @deprecated Use {@link SetPipelineCommands#sdiffstore(java.lang.String, java.lang.String...)}. + */ + @Deprecated + default Response sdiffStore(String dstKey, String... keys) { + return sdiffstore(dstKey, keys); + } Response> sinter(String... keys); diff --git a/src/test/java/redis/clients/jedis/ClusterPipeliningTest.java b/src/test/java/redis/clients/jedis/ClusterPipeliningTest.java index 3ed45bae63..ff196ec4ea 100644 --- a/src/test/java/redis/clients/jedis/ClusterPipeliningTest.java +++ b/src/test/java/redis/clients/jedis/ClusterPipeliningTest.java @@ -527,7 +527,8 @@ public void clusterPipelineSet() { Response r1 = p.sadd("my{set}", "hello", "hello", "world", "foo", "bar"); p.sadd("mynew{set}", "hello", "hello", "world"); Response> r2 = p.sdiff("my{set}", "mynew{set}"); - Response r3 = p.sdiffStore("diffset{set}", "my{set}", "mynew{set}"); + Response r3deprecated = p.sdiffStore("diffset{set}deprecated", "my{set}", "mynew{set}"); + Response r3 = p.sdiffstore("diffset{set}", "my{set}", "mynew{set}"); Response> r4 = p.smembers("diffset{set}"); Response> r5 = p.sinter("my{set}", "mynew{set}"); Response r6 = p.sinterstore("interset{set}", "my{set}", "mynew{set}"); @@ -547,6 +548,7 @@ public void clusterPipelineSet() { p.sync(); assertEquals(Long.valueOf(4), r1.get()); assertEquals(diff, r2.get()); + assertEquals(Long.valueOf(diff.size()), r3deprecated.get()); assertEquals(Long.valueOf(diff.size()), r3.get()); assertEquals(diff, r4.get()); assertEquals(inter, r5.get());