Package redis.clients.jedis

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


     try {

       jedis = getResource();
       String key = queueUrl + "-" + shard + "-Q";

       long llen = jedis.zcount(key, System.currentTimeMillis() - retention * 1000L, System.currentTimeMillis());

       if (llen == 0L) {
         return Collections.emptyList();
       }

View Full Code Here


           throw new IllegalStateException("Redis cache not available");
         }

         //get the count number
         if(type == MessageCountType.ALL){
           messageCount += jedis.zcount(queueUrl + "-" + shard + "-Q", String.valueOf(System.currentTimeMillis() - retention * 1000L), "+inf");
         } else if (type == MessageCountType.INVISIBLE) {
           messageCount += jedis.zcount(queueUrl + "-" + shard + "-Q", String.valueOf(System.currentTimeMillis()+1), "+inf");
         }
       }

View Full Code Here

         //get the count number
         if(type == MessageCountType.ALL){
           messageCount += jedis.zcount(queueUrl + "-" + shard + "-Q", String.valueOf(System.currentTimeMillis() - retention * 1000L), "+inf");
         } else if (type == MessageCountType.INVISIBLE) {
           messageCount += jedis.zcount(queueUrl + "-" + shard + "-Q", String.valueOf(System.currentTimeMillis()+1), "+inf");
         }
       }

     } catch (JedisException e) {
       brokenJedis = true;
View Full Code Here

     try {

       jedis = getResource();

       for (int shard=0; shard<numberOfShards; shard++) {          
         messageCount += jedis.zcount(queueUrl + "-" + shard + "-Q", String.valueOf(System.currentTimeMillis() - retention * 1000L), "+inf");
       }

     } catch (JedisException e) {
       brokenJedis = true;
       throw e;
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.