Examples of zremrangeByScore()


Examples of redis.clients.jedis.ShardedJedis.zremrangeByScore()

         }
         memId = getMemQueueMessage(messageId);
         jedis = getResource();
         jedis.zadd(queue.getRelativeUrl() + "-" + shard + "-Q", System.currentTimeMillis() + (delaySeconds * 1000), memId); //insert or update already existing                 
         //expire old message
         jedis.zremrangeByScore(queue.getRelativeUrl() + "-" + shard + "-Q","-inf",String.valueOf(System.currentTimeMillis() -
             (queue.getMsgRetentionPeriod() * 1000)));
         logger.debug("event=send_message cache_available=true msg_id= " + memId + " queue_url=" + queue.getAbsoluteUrl() + " shard=" + shard);
       } else {
         logger.debug("event=send_message cache_available=false msg_id= " + memId + " queue_url=" + queue.getAbsoluteUrl() + " shard=" + shard);
       }
View Full Code Here

Examples of redis.clients.jedis.ShardedJedis.zremrangeByScore()

         String memId = getMemQueueMessage(messageId);
         if (cacheAvailable) {     
           try {
             jedis.zadd(queue.getRelativeUrl() + "-" + shard + "-Q", System.currentTimeMillis() + (delaySeconds * 1000), memId); //insert or update already existing
             //expire old message
             jedis.zremrangeByScore(queue.getRelativeUrl() + "-" + shard + "-Q","-inf",String.valueOf(System.currentTimeMillis() -
                 (queue.getMsgRetentionPeriod() * 1000)));
           } catch (JedisConnectionException e) {
             trySettingCacheState(queue.getRelativeUrl(), shard, QCacheState.Unavailable);
           }
           logger.debug("event=send_message_batch cache_available=true msg_id= " + memId + " queue_url=" + queue.getAbsoluteUrl() + " shard=" + shard);
View Full Code Here

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

        String czset = semname + ":owner";
        String ctr = semname + ":counter";

        long now = System.currentTimeMillis();
        Transaction trans = conn.multi();
        trans.zremrangeByScore(
            semname.getBytes(),
            "-inf".getBytes(),
            String.valueOf(now - timeout).getBytes());
        ZParams params = new ZParams();
        params.weights(1, 0);
View Full Code Here

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

                (String)seenUpdate[0],
                (Integer)seenUpdate[1],
                (String)seenUpdate[2]);
        }
        for (Object[] msgRemove : msgRemoves){
            trans.zremrangeByScore(
                (String)msgRemove[0], 0, ((Double)msgRemove[1]).intValue());
        }
        trans.exec();

        return chatMessages;
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.