Examples of hmset()


Examples of redis.clients.jedis.Jedis.hmset()

  }
 
  public void record(String meetingId, Map<String, String> event) {   
    Jedis jedis = new Jedis(host, port);
    Long msgid = jedis.incr("global:nextRecordedMsgId");
    jedis.hmset("recording:" + meetingId + COLON + msgid, event);
    jedis.rpush("meeting:" + meetingId + COLON + "recordings", msgid.toString());           
  }
}
View Full Code Here

Examples of redis.clients.jedis.Jedis.hmset()

  @Override
  public void record(String session, RecordEvent message) {   
    Jedis jedis = redisPool.getResource();
    try {
      Long msgid = jedis.incr("global:nextRecordedMsgId");
      jedis.hmset("recording" + COLON + session + COLON + msgid, message.toMap());
      jedis.rpush("meeting" + COLON + session + COLON + "recordings", msgid.toString());
    } finally {
      redisPool.returnResource(jedis);
    }           
  }
View Full Code Here

Examples of redis.clients.jedis.Jedis.hmset()

  }
 
  private void record(String session, RecordEvent message) {
    Jedis jedis = new Jedis(host, port);
    Long msgid = jedis.incr("global:nextRecordedMsgId");
    jedis.hmset("recording" + COLON + session + COLON + msgid, message.toMap());
    jedis.rpush("meeting" + COLON + session + COLON + "recordings", msgid.toString());           
  }
 
  @Override
  public void notify(RecordEvent event) {
View Full Code Here

Examples of redis.clients.jedis.Jedis.hmset()

    public void hmSet(String key, Map<String, Serializable> values)
            throws Exception {
        Jedis jedis = null;
        try {
            jedis = this.jedisPool.getResource();
            jedis.hmset(SafeEncoder.encode(key), encodeMap(values));
            LOG.info("hmSet key:" + key + " field:" + values.keySet());
        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
            this.jedisPool.returnBrokenResource(jedis);
            throw e;
View Full Code Here

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

        }
       
        Pipeline pipeline = jedis.pipelined();
        pipeline.multi();
        String redisHtsDatapointKey = toRedisHtsDatapointKey(redisKey);
        pipeline.hmset(redisHtsDatapointKey, htsMap);
       
        String redisHtsDaysKey = toRedisHtsDaysKey(redisKey);
        for (String dateAsIntText : dates.inverse().keySet()) {
          pipeline.zrem(redisHtsDaysKey, dateAsIntText);
        }
View Full Code Here

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

        values.put("name", name);
        values.put("followers", "0");
        values.put("following", "0");
        values.put("posts", "0");
        values.put("signup", String.valueOf(System.currentTimeMillis()));
        trans.hmset("user:" + id, values);
        trans.exec();
        releaseLock(conn, "user:" + llogin, lock);
        return id;
    }
View Full Code Here

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

        data.put("id", String.valueOf(id));
        data.put("uid", String.valueOf(uid));
        data.put("login", login);

        trans = conn.multi();
        trans.hmset("status:" + id, data);
        trans.hincrBy("user:" + uid, "posts", 1);
        trans.exec();
        return id;
    }
View Full Code Here

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

            }
            final String endpointToken = channel.getEndpointToken();
            final Transaction tx = jedis.multi();
            tx.set(endpointToken, Long.toString(channel.getVersion()));
            tx.set(tokenLookupKey(endpointToken), chid);
            tx.hmset(chidLookupKey(chid), mapOf(endpointToken, uaid));
            tx.sadd(uaidLookupKey(uaid), chid);
            tx.exec();
            return true;
        } finally {
            jedisPool.returnResource(jedis);
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.