Examples of zrem()


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

        Set<String> removedIds = new HashSet<String>();
        if (!sessionIds.isEmpty()) {
            jedis = pool.getResource();
            try {
                for (String sessionId : sessionIds) {
                    if (jedis.zrem(RedisSessionKeys.getSessionsKey(), sessionId) > 0) {
                        removedIds.add(sessionId);
                    }
                }

                pool.returnResource(jedis);
View Full Code Here

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

        String redisHtsDatapointKey = toRedisHtsDatapointKey(redisKey);
        pipeline.hmset(redisHtsDatapointKey, htsMap);
       
        String redisHtsDaysKey = toRedisHtsDaysKey(redisKey);
        for (String dateAsIntText : dates.inverse().keySet()) {
          pipeline.zrem(redisHtsDaysKey, dateAsIntText);
        }
       
        for (Entry<Double, String> entry : dates.entrySet()) {
          pipeline.zadd(redisHtsDaysKey, entry.getKey(), entry.getValue());
        }
View Full Code Here

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

            List<byte[]> tags = (List<byte[]>) data.get(2);

            p = shard.pipelined();
            p.decr(ndx.cat(Seek.INFO).cat(Seek.TOTAL).key());
            for (byte[] index : indexes) {
                p.zrem(SafeEncoder.encode(index), id);
            }
            p.del(idx.key());
            for (byte[] tag : tags) {
                p.hincrBy(ndx.cat(Seek.INFO).cat(Seek.TAGS).key(), SafeEncoder
                        .encode(tag), -1);
View Full Code Here

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

       ShardedJedis jedis = null;
       boolean brokenJedis = false;
       try {
         jedis = getResource();
         long ts1 = System.currentTimeMillis();
         long numDeleted = jedis.zrem(queueUrl + "-" + shard + "-Q",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.zrem()

               CQSMessage message = messageIdToMessage.getValue();

               if (message == null) {
                 logger.warn("event=message_is_null msg_id=" + messageIdToMessage.getKey());
                 //underlying layer does not have this message, remove it from Redis layer
                 jedis.zrem(key,memId);
                 continue;
               }

               message.setMessageId(memId);
               message.setReceiptHandle(memId);
View Full Code Here

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

                //jedis is lame and does not have a constant for "-inf" which Redis supports. So we have to
                //pick an arbitrary old min value.
                Set<String> revisibleSet = jedis.zrangeByScore(queueUrl + "-" + shard + "-V", System.currentTimeMillis() - (1000 * 3600 * 24 * 14), System.currentTimeMillis());
                for (String revisibleMemId : revisibleSet) {
                    jedis.rpush(queueUrl + "-" + shard + "-Q", revisibleMemId);
                    jedis.zrem(queueUrl + "-" + shard + "-V", revisibleMemId);
                }
                ts2 = System.currentTimeMillis();
                if (revisibleSet.size() > 0) {
                  logger.debug("event=redis_revisibility queue_url=" + queueUrl + " shard=" + shard + " num_made_revisible=" + revisibleSet.size() + " res_ts=" + (ts2 - ts1));
                }
View Full Code Here

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

        if (conn.zscore(fkey1, String.valueOf(otherUid)) == null) {
            return false;
        }

        Transaction trans = conn.multi();
        trans.zrem(fkey1, String.valueOf(otherUid));
        trans.zrem(fkey2, String.valueOf(uid));
        trans.zcard(fkey1);
        trans.zcard(fkey2);
        trans.zrevrange("profile:" + otherUid, 0, HOME_TIMELINE_SIZE - 1);
View Full Code Here

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

            return false;
        }

        Transaction trans = conn.multi();
        trans.zrem(fkey1, String.valueOf(otherUid));
        trans.zrem(fkey2, String.valueOf(uid));
        trans.zcard(fkey1);
        trans.zcard(fkey2);
        trans.zrevrange("profile:" + otherUid, 0, HOME_TIMELINE_SIZE - 1);

        List<Object> response = trans.exec();
View Full Code Here

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

        trans = conn.multi();
        trans.hset("user:" + uid, "following", String.valueOf(following));
        trans.hset("user:" + otherUid, "followers", String.valueOf(followers));
        if (statuses.size() > 0){
            for (String status : statuses) {
                trans.zrem("home:" + uid, status);
            }
        }

        trans.exec();
        return true;
View Full Code Here

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

                return false;
            }

            Transaction trans = conn.multi();
            trans.del(key);
            trans.zrem("profile:" + uid, String.valueOf(statusId));
            trans.zrem("home:" + uid, String.valueOf(statusId));
            trans.hincrBy("user:" + uid, "posts", -1);
            trans.exec();

            return true;
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.