Examples of zrank()


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

           }
         }
       } else { //this means previousReceiptHandle == null and nextReceiptHandle != null. Retrieve id backward
         //return result will exclude the nextReceiptHandle
         //retrieve nextReceiptHandle, get index. if not exist, retrieve from beginning.
         Long endRank = jedis.zrank(key, nextReceiptHandle);
         if (endRank == null) {
           memIds = jedis.zrangeByScore(key, System.currentTimeMillis() - retention * 1000L, System.currentTimeMillis(), 0, num);
           if (memIds != null){
             memIdsRet = new ArrayList<String>(memIds);
           }
View Full Code Here

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

        int counter = ((Long)results.get(results.size() - 1)).intValue();

        trans = conn.multi();
        trans.zadd(semname, now, identifier);
        trans.zadd(czset, counter, identifier);
        trans.zrank(czset, identifier);
        results = trans.exec();
        int result = ((Long)results.get(results.size() - 1)).intValue();
        if (result < limit){
            return identifier;
        }
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.