public Object execute(String command, byte[]... args) { Assert.hasText(command, "a valid command needs to be specified"); try { String name = command.trim().toUpperCase(); Command cmd = new Command(name.getBytes(Charsets.UTF_8), args); if (isPipelined()) { pipeline(client.pipeline(name, cmd)); return null; } else { return client.execute(name, cmd); } } catch (RedisException ex) { throw convertSrpAccessException(ex); } }
private void initPipeline() { if (pipeline == null) { callback = new PipelineTracker(); pipeline = client.pipeline(); } }
@BeforeClass public static void setup() throws IOException { rc = new RedisClient("localhost", 6379); p = rc.pipeline(); rc2 = new RedisClient("localhost", 6379); }