From 10ed7429998cdce5198576bd0476a9bd9a4463cb Mon Sep 17 00:00:00 2001 From: Nikita Date: Sat, 25 Jul 2015 12:38:00 +0300 Subject: [PATCH] Some RScript methods hidden to next release --- src/main/java/org/redisson/RedissonScript.java | 16 ++-------------- src/main/java/org/redisson/core/RScript.java | 16 ---------------- .../java/org/redisson/core/RScriptAsync.java | 12 ------------ 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/src/main/java/org/redisson/RedissonScript.java b/src/main/java/org/redisson/RedissonScript.java index 7ad1d95b0..7da25607d 100644 --- a/src/main/java/org/redisson/RedissonScript.java +++ b/src/main/java/org/redisson/RedissonScript.java @@ -37,11 +37,11 @@ public class RedissonScript implements RScript { return commandExecutor.get(scriptLoadAsync(luaScript)); } - @Override public String scriptLoad(String key, String luaScript) { return commandExecutor.get(scriptLoadAsync(key, luaScript)); } + @Override public Future scriptLoadAsync(String luaScript) { return commandExecutor.writeAllAsync(RedisCommands.SCRIPT_LOAD, new SlotCallback() { volatile String result; @@ -57,7 +57,6 @@ public class RedissonScript implements RScript { }, luaScript); } - @Override public Future scriptLoadAsync(String key, String luaScript) { return commandExecutor.writeAsync(key, RedisCommands.SCRIPT_LOAD, luaScript); } @@ -67,7 +66,6 @@ public class RedissonScript implements RScript { return eval(null, mode, luaScript, returnType); } - @Override public R eval(String key, Mode mode, String luaScript, ReturnType returnType) { return eval(key, mode, luaScript, returnType, Collections.emptyList()); } @@ -77,7 +75,6 @@ public class RedissonScript implements RScript { return eval(null, mode, luaScript, returnType, keys, values); } - @Override public R eval(String key, Mode mode, String luaScript, ReturnType returnType, List keys, Object... values) { return (R) commandExecutor.get(evalAsync(key, mode, luaScript, returnType, keys, values)); } @@ -87,7 +84,6 @@ public class RedissonScript implements RScript { return evalAsync(null, mode, luaScript, returnType, keys, values); } - @Override public Future evalAsync(String key, Mode mode, String luaScript, ReturnType returnType, List keys, Object... values) { if (mode == Mode.READ_ONLY) { return commandExecutor.evalReadAsync(key, returnType.getCommand(), luaScript, keys, values); @@ -100,7 +96,6 @@ public class RedissonScript implements RScript { return evalSha(null, mode, shaDigest, returnType); } - @Override public R evalSha(String key, Mode mode, String shaDigest, ReturnType returnType) { return evalSha(key, mode, shaDigest, returnType, Collections.emptyList()); } @@ -110,7 +105,6 @@ public class RedissonScript implements RScript { return evalSha(null, mode, shaDigest, returnType, keys, values); } - @Override public R evalSha(String key, Mode mode, String shaDigest, ReturnType returnType, List keys, Object... values) { return (R) commandExecutor.get(evalShaAsync(key, mode, shaDigest, returnType, keys, values)); } @@ -120,7 +114,6 @@ public class RedissonScript implements RScript { return evalShaAsync(null, mode, shaDigest, returnType, keys, values); } - @Override public Future evalShaAsync(String key, Mode mode, String shaDigest, ReturnType returnType, List keys, Object... values) { RedisCommand command = new RedisCommand(returnType.getCommand(), "EVALSHA"); if (mode == Mode.READ_ONLY) { @@ -134,7 +127,6 @@ public class RedissonScript implements RScript { commandExecutor.get(scriptKillAsync()); } - @Override public void scriptKill(String key) { commandExecutor.get(scriptKillAsync(key)); } @@ -144,17 +136,14 @@ public class RedissonScript implements RScript { return commandExecutor.writeAllAsync(RedisCommands.SCRIPT_KILL); } - @Override public Future scriptKillAsync(String key) { return commandExecutor.writeAsync(key, RedisCommands.SCRIPT_KILL); } - @Override public List scriptExists(String key, String ... shaDigests) { return commandExecutor.get(scriptExistsAsync(key, shaDigests)); } - @Override public Future> scriptExistsAsync(String key, String ... shaDigests) { return commandExecutor.writeAsync(key, RedisCommands.SCRIPT_EXISTS, shaDigests); } @@ -164,7 +153,6 @@ public class RedissonScript implements RScript { commandExecutor.get(scriptFlushAsync()); } - @Override public void scriptFlush(String key) { commandExecutor.get(scriptFlushAsync(key)); } @@ -174,7 +162,7 @@ public class RedissonScript implements RScript { return commandExecutor.writeAllAsync(RedisCommands.SCRIPT_FLUSH); } - @Override +// @Override public Future scriptFlushAsync(String key) { return commandExecutor.writeAsync(key, RedisCommands.SCRIPT_FLUSH); } diff --git a/src/main/java/org/redisson/core/RScript.java b/src/main/java/org/redisson/core/RScript.java index 35e3484a3..818d55229 100644 --- a/src/main/java/org/redisson/core/RScript.java +++ b/src/main/java/org/redisson/core/RScript.java @@ -57,22 +57,6 @@ public interface RScript extends RScriptAsync { void scriptKill(); - List scriptExists(String key, String ... shaDigests); - void scriptFlush(); - void scriptFlush(String key); - - void scriptKill(String key); - - String scriptLoad(String key, String luaScript); - - R evalSha(String key, Mode mode, String shaDigest, ReturnType returnType); - - R evalSha(String key, Mode mode, String shaDigest, ReturnType returnType, List keys, Object... values); - - R eval(String key, Mode mode, String luaScript, ReturnType returnType); - - R eval(String key, Mode mode, String luaScript, ReturnType returnType, List keys, Object... values); - } diff --git a/src/main/java/org/redisson/core/RScriptAsync.java b/src/main/java/org/redisson/core/RScriptAsync.java index 67ee7be4c..50ebabfb8 100644 --- a/src/main/java/org/redisson/core/RScriptAsync.java +++ b/src/main/java/org/redisson/core/RScriptAsync.java @@ -34,16 +34,4 @@ public interface RScriptAsync { Future scriptKillAsync(); - Future> scriptExistsAsync(String key, String ... shaDigests); - - Future scriptFlushAsync(String key); - - Future scriptKillAsync(String key); - - Future scriptLoadAsync(String key, String luaScript); - - Future evalShaAsync(String key, Mode mode, String shaDigest, ReturnType returnType, List keys, Object... values); - - Future evalAsync(String key, Mode mode, String luaScript, ReturnType returnType, List keys, Object... values); - }