Package redis.clients.jedis

Examples of redis.clients.jedis.Transaction.lpop()


  jedis.zadd("zset", 1, "foo");
  jedis.sadd("set", "foo");

  Transaction t = jedis.multi();
  Response<String> string = t.get("string");
  Response<String> list = t.lpop("list");
  Response<String> hash = t.hget("hash", "foo");
  Response<Set<String>> zset = t.zrange("zset", 0, -1);
  Response<String> set = t.spop("set");
  t.exec();
View Full Code Here


  jedis.zadd("zset", 1, "foo");
  jedis.sadd("set", "foo");

  Transaction t = jedis.multi();
  Response<byte[]> string = t.get("string".getBytes());
  Response<byte[]> list = t.lpop("list".getBytes());
  Response<byte[]> hash = t.hget("hash".getBytes(), "foo".getBytes());
  Response<Set<byte[]>> zset = t.zrange("zset".getBytes(), 0, -1);
  Response<byte[]> set = t.spop("set".getBytes());
  t.exec();
View Full Code Here

                this.jedis.unwatch();
                result = val;
                break;
            }
            final Transaction tx = this.jedis.multi();
            tx.lpop(from);
            tx.lpush(to, val);
            if (tx.exec() != null) {
                result = val;
                break;
            }
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.