Examples of multi()


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

  jedis.set(key2, val2);
  jedis.hmset(key3, hashMap);
  jedis.hmset(key4, hashMap1);

  Pipeline pipeline = jedis.pipelined();
  pipeline.multi();

  pipeline.get(key1);
  pipeline.hgetAll(key2);
  pipeline.hgetAll(key3);
  pipeline.get(key4);
View Full Code Here

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

    }

    @Test
    public void multi() {
  Pipeline p = jedis.pipelined();
  p.multi();
  Response<Long> r1 = p.hincrBy("a", "f1", -1);
  Response<Long> r2 = p.hincrBy("a", "f1", -2);
  Response<List<Object>> r3 = p.exec();
  List<Object> result = p.syncAndReturnAll();
View Full Code Here

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

  jedis.set("foo", "314");
  jedis.set("bar", "foo");
  jedis.set("hello", "world");
  Pipeline p = jedis.pipelined();
  Response<String> r1 = p.get("bar");
  p.multi();
  Response<String> r2 = p.get("foo");
  p.exec();
  Response<String> r3 = p.get("hello");
  p.sync();
View Full Code Here

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

    }

    @Test(expected = JedisDataException.class)
    public void pipelineMultiShoudThrowJedisDataExceptionWhenAlreadyInMulti() {
  Pipeline pipeline = jedis.pipelined();
  pipeline.multi();
  pipeline.set("foo", "3");
  pipeline.multi();
    }

    @Test
View Full Code Here

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

    @Test(expected = JedisDataException.class)
    public void pipelineMultiShoudThrowJedisDataExceptionWhenAlreadyInMulti() {
  Pipeline pipeline = jedis.pipelined();
  pipeline.multi();
  pipeline.set("foo", "3");
  pipeline.multi();
    }

    @Test
    public void testDiscardInPipeline() {
  Pipeline pipeline = jedis.pipelined();
View Full Code Here

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

    }

    @Test
    public void testDiscardInPipeline() {
  Pipeline pipeline = jedis.pipelined();
  pipeline.multi();
  pipeline.set("foo", "bar");
  Response<String> discard = pipeline.discard();
  Response<String> get = pipeline.get("foo");
  pipeline.sync();
  discard.get();
View Full Code Here

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

    @Test
    public void testResetStateWhenInMultiWithinPipeline() {
  jedis.auth("foobared");

  Pipeline p = jedis.pipelined();
  p.multi();
  p.set("foooo", "barrr");

  jedis.resetState();
  assertEquals(null, jedis.get("foooo"));
    }
View Full Code Here

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

            p.sync();
            counts = responses.stream().map(Response::get).collect(Collectors.toList());

            while (true) {
                p = jedis.pipelined();
                p.multi();
                for (int i = 0; i < config().hashes(); i++) {
                    if (counts.get(i) <= 0)
                        bloom.set(p, hashes[i], false);
                }
                Response<List<Object>> exec = p.exec();
View Full Code Here

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

            p.sync();
            counts = responses.stream().map(Response::get).collect(Collectors.toList());

            while (true) {
                p = jedis.pipelined();
                p.multi();
                for (int i = 0; i < config().hashes(); i++) {
                    if (counts.get(i) <= 0)
                        bloom.set(p, hashes[i], false);
                }
                Response<List<Object>> exec = p.exec();
View Full Code Here

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

          htsMap.put(dateAsIntText, Double.toString(entry.getValue()));
          dates.put(Double.valueOf(dateAsIntText), dateAsIntText);
        }
       
        Pipeline pipeline = jedis.pipelined();
        pipeline.multi();
        String redisHtsDatapointKey = toRedisHtsDatapointKey(redisKey);
        pipeline.hmset(redisHtsDatapointKey, htsMap);
       
        String redisHtsDaysKey = toRedisHtsDaysKey(redisKey);
        for (String dateAsIntText : dates.inverse().keySet()) {
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.