Examples of hincrBy()


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

                p.rpush(idx.cat(id).key(), key);
                p.hset(idx.cat(id).cat(Seek.FIELDS).key(), field.getKey(),
                        field.getValue());

                // adds on facets
                p.hincrBy(idx.cat(Seek.INFO).cat(field.getKey()).key(), field
                        .getValue(), 1);
                p.hincrBy(idx.cat(Seek.INFO).key(), field.getKey(), 1);
            }
            for (String tag : tags) {
                idx.cat(tag);
View Full Code Here

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

                        field.getValue());

                // adds on facets
                p.hincrBy(idx.cat(Seek.INFO).cat(field.getKey()).key(), field
                        .getValue(), 1);
                p.hincrBy(idx.cat(Seek.INFO).key(), field.getKey(), 1);
            }
            for (String tag : tags) {
                idx.cat(tag);
                String key = idx.key();
                p.zadd(key, order, id);
View Full Code Here

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

                p.zadd(key, order, id);
                p.rpush(idx.cat(id).key(), key);
                p.rpush(idx.cat(id).cat(Seek.TAGS).key(), tag);

                // adds on facets
                p.hincrBy(idx.cat(Seek.INFO).cat(Seek.TAGS).key(), tag, 1);
                p.hincrBy(idx.cat(Seek.INFO).key(), Seek.TAGS, 1);
            }
            for (Map.Entry<String, Set<String>> field : textFields.entrySet()) {
                for (String word : field.getValue()) {
                    idx.cat(field.getKey()).cat(word);
View Full Code Here

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

                p.rpush(idx.cat(id).key(), key);
                p.rpush(idx.cat(id).cat(Seek.TAGS).key(), tag);

                // adds on facets
                p.hincrBy(idx.cat(Seek.INFO).cat(Seek.TAGS).key(), tag, 1);
                p.hincrBy(idx.cat(Seek.INFO).key(), Seek.TAGS, 1);
            }
            for (Map.Entry<String, Set<String>> field : textFields.entrySet()) {
                for (String word : field.getValue()) {
                    idx.cat(field.getKey()).cat(word);
                    String key = idx.key();
View Full Code Here

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

            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);
            }
            Iterator<byte[]> iterator = fields.iterator();
            while (iterator.hasNext()) {
                String field = SafeEncoder.encode(iterator.next());
View Full Code Here

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

            }
            Iterator<byte[]> iterator = fields.iterator();
            while (iterator.hasNext()) {
                String field = SafeEncoder.encode(iterator.next());
                String key = SafeEncoder.encode(iterator.next());
                p.hincrBy(ndx.cat(Seek.INFO).key(), field, -1);
                p.hincrBy(ndx.cat(Seek.INFO).cat(field).key(), key, -1);
            }
            p.del(idx.cat(Seek.FIELDS).key());
            p.del(idx.cat(Seek.TAGS).key());
            p.execute();
View Full Code Here

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

            Iterator<byte[]> iterator = fields.iterator();
            while (iterator.hasNext()) {
                String field = SafeEncoder.encode(iterator.next());
                String key = SafeEncoder.encode(iterator.next());
                p.hincrBy(ndx.cat(Seek.INFO).key(), field, -1);
                p.hincrBy(ndx.cat(Seek.INFO).cat(field).key(), key, -1);
            }
            p.del(idx.cat(Seek.FIELDS).key());
            p.del(idx.cat(Seek.TAGS).key());
            p.execute();
            Seek.getPool().returnResource(jedis);
View Full Code Here

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

        data.put("uid", String.valueOf(uid));
        data.put("login", login);

        trans = conn.multi();
        trans.hmset("status:" + id, data);
        trans.hincrBy("user:" + uid, "posts", 1);
        trans.exec();
        return id;
    }

    public long postStatus(Jedis conn, long uid, String message) {
View Full Code Here

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

            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;
        }finally{
            releaseLock(conn, key, lock);
View Full Code Here

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

        Transaction trans = conn.multi();
        for (int prec : PRECISION) {
            long pnow = (now / prec) * prec;
            String hash = String.valueOf(prec) + ':' + name;
            trans.zadd("known:", 0, hash);
            trans.hincrBy("count:" + hash, String.valueOf(pnow), count);
        }
        trans.exec();
    }

    public List<Pair<Integer,Integer>> getCounter(
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.