Package redis.clients.jedis

Examples of redis.clients.jedis.Pipeline.hmget()


  jedis.hset("key".getBytes(), "f22".getBytes(), "v2222".getBytes());

  Pipeline p = jedis.pipelined();
  Response<Map<byte[], byte[]>> fmap = p.hgetAll("key".getBytes());
  Response<Set<byte[]>> fkeys = p.hkeys("key".getBytes());
  Response<List<byte[]>> fordered = p.hmget("key".getBytes(),
    "f22".getBytes(), "f1".getBytes());
  Response<List<byte[]>> fvals = p.hvals("key".getBytes());
  p.sync();

  assertNotNull(fmap.get());
View Full Code Here


                Response<List<Object>> exec = p.exec();
                p.sync();
                if (exec.get() == null) {
                    p = jedis.pipelined();
                    p.watch(keys.COUNTS_KEY, keys.BITS_KEY);
                    Response<List<String>> hmget = p.hmget(keys.COUNTS_KEY, hashesString);
                    p.sync();
                    counts = hmget.get().stream().map(Long::valueOf).collect(Collectors.toList());
                } else {
                    return Collections.min(counts);
                }
View Full Code Here

                Response<List<Object>> exec = p.exec();
                p.sync();
                if (exec.get() == null) {
                    p = jedis.pipelined();
                    p.watch(keys.COUNTS_KEY, keys.BITS_KEY);
                    Response<List<String>> hmget = p.hmget(keys.COUNTS_KEY, hashesString);
                    p.sync();
                    counts = hmget.get().stream().map(Long::valueOf).collect(Collectors.toList());
                } else {
                    return Collections.min(counts);
                }
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.