Package redis.clients.jedis

Examples of redis.clients.jedis.ShardedJedisPipeline.syncAndReturnAll()


    @Test
    public void pipeline() throws UnsupportedEncodingException {
  ShardedJedisPipeline p = jedis.pipelined();
  p.set("foo", "bar");
  p.get("foo");
  List<Object> results = p.syncAndReturnAll();

  assertEquals(2, results.size());
  assertEquals("OK", results.get(0));
  assertEquals("bar", results.get(1));
    }
View Full Code Here


  jedis.resetState();

  pipeline = jedis.pipelined();
  pipeline.incr("pipelined");
  pipeline.incr("pipelined2");
  List<Object> results = pipeline.syncAndReturnAll();

  assertEquals(2, results.size());
  pool.returnResource(jedis);
  pool.destroy();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.