Package redis.clients.jedis

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


      long ts1 = System.currentTimeMillis();
        ShardedJedis jedis = getResource();
        boolean brokenJedis = false;
       
        try {
            String st = jedis.hget(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE);
            if (st == null) {
              return null;
            }
            return QCacheState.valueOf(st);
        } catch (JedisException e) {
View Full Code Here


                long ts2 = System.currentTimeMillis();
                CQSControllerServlet.valueAccumulator.addToCounter(AccumulatorName.RedisTime, (ts2 - ts1));
                log.debug("event=revisibility_check queue_url=" + queueUrl + " shard=" + shard + " invisible_set_size=" + keys.size());
                for (String key : keys) {
                    long ts3 = System.currentTimeMillis();
                    String val = jedis.hget(queueUrl + "-" + shard + "-H", key);
                    long ts4 = System.currentTimeMillis();
                    CQSControllerServlet.valueAccumulator.addToCounter(AccumulatorName.RedisTime, (ts4 - ts3));
                    if (val == null) {
                      continue;                   
                    }
View Full Code Here

     long ts1 = System.currentTimeMillis();
     ShardedJedis jedis = getResource();
     boolean brokenJedis = false;

     try {
       String st = jedis.hget(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE);
       if (st == null) {
         return null;
       }
       return QCacheState.valueOf(st);
     } catch (JedisException e) {
View Full Code Here

      super.setLockFactory(lockFactory);
  }
 
  private void open() {
    ShardedJedis rds = redisPool.getResource();
    byte[] size = rds.hget(getDirNameBytes(), ":size".getBytes());
    directorySize = 0;
    try {
      directorySize = ByteBuffer.wrap(size).asLongBuffer().get();
    }catch(Exception e){
      reloadSizeFromFiles();
View Full Code Here

    readBuffer();
  }
 
  public synchronized long size() {
    ShardedJedis jd = redisPool.getResource();
    byte [] p = jd.hget(directory.getDirNameBytes(), getNameBytes());
    if( p != null && p.length == Long.SIZE/8 ){
      this.fileLength = ByteBuffer.wrap(p).asLongBuffer().get();
    }
    redisPool.returnResource(jd);
    return this.fileLength;
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.