Package redis.clients.jedis

Examples of redis.clients.jedis.ShardedJedis


            for (String shard : shards) {
                base.cat(shard);
            }
        }
        final Nest idx = base.fork();
        ShardedJedis jedis = getPool().getResource();
        try {
            Jedis shard = jedis.getShard(idx.key());
            String stotal = shard.get(idx.cat(Seek.INFO).cat(Seek.TOTAL).key());
            try {
                info.setTotal(Integer.parseInt(stotal));
            } catch (NumberFormatException e) {
                info.setTotal(0);
View Full Code Here


            for (String shard : shards) {
                base.cat(shard);
            }
        }
        final Nest idx = base.fork();
        ShardedJedis jedis = getPool().getResource();
        try {
            final Jedis shard = jedis.getShard(idx.key());
            shard.del(idx.cat(Seek.INFO).cat(Seek.TOTAL).key());
            final Map<String, String> facets = shard.hgetAll(idx.cat(Seek.INFO)
                    .key());
            Pipeline p = shard.pipelined();
            for (String facetField : facets.keySet()) {
View Full Code Here

        for (String field : shards) {
            idx.cat(field);
        }
        Nest ndx = idx.fork();
        idx = ndx.cat(id).fork();
        ShardedJedis jedis = Seek.getPool().getResource();
        Jedis shard = jedis.getShard(ndx.key());
        try {
            Pipeline p = shard.pipelined();
            // List<String> indexes =
            p.lrange(idx.key(), 0, -1);
            // Map<String, String> fields =
View Full Code Here

        String rkeyCached = index.cat(Seek.QUERIES).cat(query)
                .cat(Seek.QUERIES_RESULT).key();

        ZParams zparams = new ZParams();
        zparams.aggregate(Aggregate.MAX);
        ShardedJedis jedis = Seek.getPool().getResource();
        Jedis shard = jedis.getShard(shardKey);
        try {
            long tstart = System.nanoTime();
            List<String> result = null;
            long count = 0;
            Set<String> range = jedis.zrange(rkeyCached, start, end);
            if (range != null && range.size() > 0) {
                count = jedis.zcard(rkeyCached);
                result = Arrays.asList(range.toArray(new String[range.size()]));
            } else {
                Pipeline pipeline = shard.pipelined();
                List<ConjunctiveFormula> dnf = DNF.convert(formulas);
                for (ConjunctiveFormula conjunctiveFormula : dnf) {
View Full Code Here

TOP

Related Classes of redis.clients.jedis.ShardedJedis

Copyright © 2018 www.massapicom. 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.