Examples of hmset()


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

    }

    // Redis Hash Operations
    public String hmset(Map<String, String> hash) {
        Jedis jedis = getResource();
        String hmset = jedis.hmset(key(), hash);
        returnResource(jedis);
        return hmset;
    }

    public Map<String, String> hgetAll() {
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.Jedis.hmset()

        hashMap.put("emotion", Integer.toString(emotion.getEmotion()));
        hashMap.put("note", emotion.getNote());
        hashMap.put("day", Long.valueOf(emotion.getCurrentday().getTime()).toString());
        try {
            Long incr = jedis.incr("ids:emotion");
            jedis.hmset("emotion:"+incr, hashMap);
        }catch(Exception e){
            e.printStackTrace();
        } finally {
            emometer.EmoMeter.getPool().returnResource(jedis);
        }
View Full Code Here

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

        for (String key: info.keySet()) {
              log.debug("Storing metadata {} = {}", key, info.get(key));
        }  

        log.debug("Saving metadata in {}", meetingId);
      jedis.hmset("meeting:info:" + meetingId, info);
    } catch (Exception e){
      log.warn("Cannot record the info meeting:"+meetingId,e);
    } finally {
      redisPool.returnResource(jedis);
    }   
View Full Code Here

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

      props.put("meetingId", meetingId);
      props.put("externalMeetingID", externalMeetingID);
      props.put("callbackURL", callbackURL);
      props.put("active", "true");

      jedis.hmset("meeting:" + meetingId + ":subscription:" + sid, props);
      jedis.rpush("meeting:" + meetingId + ":subscriptions", sid);
     
    } catch (Exception e){
      log.warn("Cannot store subscription:" + meetingId, e);
    } finally {
View Full Code Here

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

        for (String key: info.keySet()) {
           log.debug("Storing metadata {} = {}", key, info.get(key));
        }  

        log.debug("Saving metadata in {}", meetingId);
      jedis.hmset("meeting:info:" + meetingId, info);
    } catch (Exception e){
      log.warn("Cannot record the info meeting:"+meetingId,e);
    } finally {
      redisPool.returnResource(jedis);
    }   
View Full Code Here

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

      props.put("meetingId", meetingId);
      props.put("externalMeetingID", externalMeetingID);
      props.put("callbackURL", callbackURL);
      props.put("active", "true");

      jedis.hmset("meeting:" + meetingId + ":subscription:" + sid, props);
      jedis.rpush("meeting:" + meetingId + ":subscriptions", sid);
     
    } catch (Exception e){
      log.warn("Cannot store subscription:" + meetingId, e);
    } finally {
View Full Code Here

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

        for (String key: info.keySet()) {
              log.debug("Storing metadata {} = {}", key, info.get(key));
        }  

        log.debug("Saving metadata in {}", meetingId);
      jedis.hmset("meeting:info:" + meetingId, info);
    } catch (Exception e){
      log.warn("Cannot record the info meeting:"+meetingId,e);
    } finally {
      redisPool.returnResource(jedis);
    }   
View Full Code Here

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

      props.put("meetingId", meetingId);
      props.put("externalMeetingID", externalMeetingID);
      props.put("callbackURL", callbackURL);
      props.put("active", "true");

      jedis.hmset("meeting:" + meetingId + ":subscription:" + sid, props);
      jedis.rpush("meeting:" + meetingId + ":subscriptions", sid);
     
    } catch (Exception e){
      log.warn("Cannot store subscription:" + meetingId, e);
    } finally {
View Full Code Here

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

  public void storePoll(Poll p){
    Jedis jedis = jedisPool.getResource();
    String pattern = getPollRedisPattern(p.getMeetingID());

    HashMap<String,String> pollMap = p.toMap();
    jedis.hmset(pattern + SEPARATOR + p.getPollID(), pollMap);
    jedisPool.returnResource(jedis);
  }

  public void storePollAnswers(String meetingID, String pollID, Map<String,String> answers){
    Jedis jedis = jedisPool.getResource();
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.