Examples of hdel()


Examples of redis.clients.jedis.Jedis.hdel()

        for (Map.Entry<String, JedisPool> entry : jedisPools.entrySet()) {
            JedisPool jedisPool = entry.getValue();
            try {
                Jedis jedis = jedisPool.getResource();
                try {
                    jedis.hdel(key, value);
                    jedis.publish(key, Constants.UNREGISTER);
                } finally {
                    jedisPool.returnResource(jedis);
                }
            } catch (Throwable t) {
View Full Code Here

Examples of redis.clients.jedis.Jedis.hdel()

            for (Map.Entry<String, JedisPool> entry : jedisPools.entrySet()) {
                JedisPool jedisPool = entry.getValue();
                try {
                    Jedis jedis = jedisPool.getResource();
                    try {
                        jedis.hdel(key, value);
                        jedis.publish(key, Constants.UNSUBSCRIBE);
                    } finally {
                        jedisPool.returnResource(jedis);
                    }
                } catch (Throwable t) {
View Full Code Here

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

            ShardedJedis jedis = null;
            boolean brokenJedis = false;
            try {
                jedis = getResource();
                long ts1 = System.currentTimeMillis();
                long numDeleted = jedis.hdel(queueUrl + "-" + shard + "-H", receiptHandle);
                if (numDeleted != 1) {
                    logger.warn("event=delete_message error_code=could_not_delelete_hidden_set queue_url=" + queueUrl + " shard=" + shard + " mem_id=" + receiptHandle);
                }
                if (jedis.del(queueUrl + "-" + shard + "-A-" + receiptHandle) == 0) {
                    logger.warn("event=delete_message error_code=could_not_delete_attributes queue_url=" + queueUrl + " shard=" + shard + " mem_id=" + receiptHandle);
View Full Code Here

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

             
                jedis = getResource();
                long ts1 = System.currentTimeMillis();
                if (visibilityTO == 0) { //make immediately visible
                    jedis.rpush(queue.getRelativeUrl() + "-" + shard + "-Q", receiptHandle);
                   jedis.hdel(queue.getRelativeUrl() + "-" + shard + "-H", receiptHandle);
                    return true;
                } else { //update new visibilityTO
                  jedis.hset(queue.getRelativeUrl() + "-" + shard + "-H", receiptHandle, Long.toString(System.currentTimeMillis() + (visibilityTO * 1000)));                 
                }
               
View Full Code Here

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

                    }
                }
                //process memIds that should be re-visible
                for (String memId : memIds) {
                  jedis.rpush(queueUrl + "-" + shard + "-Q", memId);
                    jedis.hdel(queueUrl + "-" + shard + "-H", memId);
                }
                long ts3 = System.currentTimeMillis();
                log.debug("event=revisibility_check queue_url=" + queueUrl + " shard=" + shard + " num_made_revisible=" + memIds.size() + " redisTime=" + CQSControllerServlet.valueAccumulator.getCounter(AccumulatorName.RedisTime) + " responseTimeMS=" + (ts3 - ts0) + " hidden_set_size=" + keys.size());
            } catch (Exception e) {
                if (e instanceof JedisException) {
View Full Code Here

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

    }   
  }
 
  public synchronized void delete() {
    ShardedJedis jd = redisPool.getResource();
    jd.hdel(directory.getDirNameBytes(), getPathBytes());
    redisPool.returnResource(jd);
    dirtyBuffer = false;
  }

  public String getPath() {
View Full Code Here

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

           }
         }
       }
       Transaction tr = j.multi();
       if (state == null) {
         tr.hdel(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE);
       } else {
         tr.hset(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE, state.name());
       }
       List<Object> resp = tr.exec();
       if (resp == null) {
View Full Code Here

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

                    }
                }
            }
            Transaction tr = j.multi();
            if (state == null) {
                tr.hdel(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE);
            } else {
                tr.hset(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE, state.name());
            }
            List<Object> resp = tr.exec();
            if (resp == null) {
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.