Some RScript methods hidden to next release

pull/243/head
Nikita 10 years ago
parent 8e0e5eef49
commit 10ed742999

@ -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<String> scriptLoadAsync(String luaScript) {
return commandExecutor.writeAllAsync(RedisCommands.SCRIPT_LOAD, new SlotCallback<String, String>() {
volatile String result;
@ -57,7 +57,6 @@ public class RedissonScript implements RScript {
}, luaScript);
}
@Override
public Future<String> 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> 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> R eval(String key, Mode mode, String luaScript, ReturnType returnType, List<Object> 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 <R> Future<R> evalAsync(String key, Mode mode, String luaScript, ReturnType returnType, List<Object> 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> 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> R evalSha(String key, Mode mode, String shaDigest, ReturnType returnType, List<Object> 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 <R> Future<R> evalShaAsync(String key, Mode mode, String shaDigest, ReturnType returnType, List<Object> 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<Void> scriptKillAsync(String key) {
return commandExecutor.writeAsync(key, RedisCommands.SCRIPT_KILL);
}
@Override
public List<Boolean> scriptExists(String key, String ... shaDigests) {
return commandExecutor.get(scriptExistsAsync(key, shaDigests));
}
@Override
public Future<List<Boolean>> 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<Void> scriptFlushAsync(String key) {
return commandExecutor.writeAsync(key, RedisCommands.SCRIPT_FLUSH);
}

@ -57,22 +57,6 @@ public interface RScript extends RScriptAsync {
void scriptKill();
List<Boolean> scriptExists(String key, String ... shaDigests);
void scriptFlush();
void scriptFlush(String key);
void scriptKill(String key);
String scriptLoad(String key, String luaScript);
<R> R evalSha(String key, Mode mode, String shaDigest, ReturnType returnType);
<R> R evalSha(String key, Mode mode, String shaDigest, ReturnType returnType, List<Object> keys, Object... values);
<R> R eval(String key, Mode mode, String luaScript, ReturnType returnType);
<R> R eval(String key, Mode mode, String luaScript, ReturnType returnType, List<Object> keys, Object... values);
}

@ -34,16 +34,4 @@ public interface RScriptAsync {
Future<Void> scriptKillAsync();
Future<List<Boolean>> scriptExistsAsync(String key, String ... shaDigests);
Future<Void> scriptFlushAsync(String key);
Future<Void> scriptKillAsync(String key);
Future<String> scriptLoadAsync(String key, String luaScript);
<R> Future<R> evalShaAsync(String key, Mode mode, String shaDigest, ReturnType returnType, List<Object> keys, Object... values);
<R> Future<R> evalAsync(String key, Mode mode, String luaScript, ReturnType returnType, List<Object> keys, Object... values);
}

Loading…
Cancel
Save