Examples of rPush()


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

      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 {
      redisPool.returnResource(jedis);
View Full Code Here

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

      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 {
      redisPool.returnResource(jedis);
View Full Code Here

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

      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 {
      redisPool.returnResource(jedis);
View Full Code Here

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

 
  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.rpush()

  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.rpush()

 
  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) {
    if ((event instanceof RecordStoppedEvent) || (event instanceof RecordStartedEvent)) {
View Full Code Here

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

        Jedis jedis = null;
        try {
            jedis = this.jedisPool.getResource();

            long begin = System.currentTimeMillis();
            jedis.rpush(SafeEncoder.encode(key), jsonSerialize(value));
            long end = System.currentTimeMillis();
            LOG.info("rpush key:" + key + " spends: " + (end - begin)
                    + " millionseconds.");
        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
View Full Code Here

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

    Jedis jedis = new Jedis("localhost");
   
    String key = generateKey();
   
    for (int i=0; i<QUEUE_ITEM_AMOUNT; i++) {
      jedis.rpush(key, "foo"+i);
    }

    CountDownLatch startLatch = new CountDownLatch(1);
    CountDownLatch completionCounter = new CountDownLatch(QUEUE_ITEM_AMOUNT);
   
View Full Code Here

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

    double itemsPerSecond = QUEUE_ITEM_AMOUNT/ (diff/1000d);
    print("Queue listeners processed about " + formatDouble(itemsPerSecond) +" items per second.");
 
    // blpop doesn't throw interrupted exception so we have get them out of blocking mode like this
    for (int i=0; i<QUEUE_LISTENER_AMOUNT; i++) {
      jedis.rpush(key, "stopBlocking");
    }
   
  }
 
  private void startQueueListenerInNewThread(final String queueKey, final CountDownLatch startLatch, final CountDownLatch completionCounter) {
View Full Code Here

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

            Pipeline p = shard.pipelined();
            for (Map.Entry<String, String> field : fields.entrySet()) {
                idx.cat(field.getKey()).cat(field.getValue());
                String key = idx.key();
                p.zadd(key, order, id);
                p.rpush(idx.cat(id).key(), key);
                p.hset(idx.cat(id).cat(Seek.FIELDS).key(), field.getKey(),
                        field.getValue());

                // adds on facets
                p.hincrBy(idx.cat(Seek.INFO).cat(field.getKey()).key(), field
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.