Package redis.clients.jedis

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


         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

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.