Examples of expire()


Examples of redis.clients.jedis.Pipeline.expire()

      Pipeline pipe = jedis.pipelined();
      pipe.del(key);
      for (String entry : entries) {
        pipe.sadd(key, entry);
      }
      pipe.expire(key, (int) TimeUnit.DAYS.toSeconds(7));
      pipe.sync();
    }
  }

  @Override
View Full Code Here

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

               if (attrs.get(1) != null) {
                 recvCount = Integer.parseInt(attrs.get(1)) + 1;
               }

               jedis.hset(queue.getRelativeUrl() + "-" + shard + "-A-" + memId, CQSConstants.REDIS_APPROXIMATE_RECEIVE_COUNT, Integer.toString(recvCount));
               jedis.expire(queue.getRelativeUrl() + "-" + shard +  "-A-" + memId, 3600 * 24 * 14); //14 days expiration if not deleted
               msgAttrs.put(CQSConstants.APPROXIMATE_RECEIVE_COUNT, Integer.toString(recvCount));
               message.setAttributes(msgAttrs);
               ret.add(message);
             }

View Full Code Here

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

        if (terms.size() > 0) {
            String matchedKey = "terms:matched:" + targetId;
            for (String term : terms) {
                trans.sadd(matchedKey, term);
            }
            trans.expire(matchedKey, 900);
        }

        trans.incr("type:" + type + ":views:");
        for (String term : terms) {
            trans.zincrby("views:" + adId, 1, term);
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.