Package redis.clients.jedis

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


                    p.zadd(key, order, id);
                    p.rpush(idx.cat(id).key(), key);
                }
            }
            p.incr(idx.cat(Seek.INFO).cat(Seek.TOTAL).key());
            p.execute();
            Seek.getPool().returnResource(jedis);
        } catch (Exception e) {
            Seek.getPool().returnResource(jedis);
            throw new SeekException(e);
        }
View Full Code Here


                    .key());
            Pipeline p = shard.pipelined();
            for (String facetField : facets.keySet()) {
                p.hgetAll(idx.cat(Seek.INFO).cat(facetField).key());
            }
            List<Object> data = p.execute();
            getPool().returnResource(jedis);
            Iterator<Object> iterator = data.iterator();
            for (String facetField : facets.keySet()) {
                List<Object> next = (List<Object>) iterator.next();
                Iterator<Object> it = next.iterator();
View Full Code Here

            Pipeline p = shard.pipelined();
            for (String facetField : facets.keySet()) {
                p.del(idx.cat(Seek.INFO).cat(facetField).key());
            }
            p.del(idx.cat(Seek.INFO).key());
            p.execute();
            getPool().returnResource(jedis);
        } catch (Exception e) {
            pool.returnResource(jedis);
            throw new SeekException(e);
        }
View Full Code Here

            p.lrange(idx.key(), 0, -1);
            // Map<String, String> fields =
            p.hgetAll(idx.cat(Seek.FIELDS).key());
            // List<String> tags =
            p.lrange(idx.cat(Seek.TAGS).key(), 0, -1);
            List<Object> data = p.execute();
            List<byte[]> indexes = (List<byte[]>) data.get(0);
            List<byte[]> fields = (List<byte[]>) data.get(1);
            List<byte[]> tags = (List<byte[]>) data.get(2);

            p = shard.pipelined();
View Full Code Here

                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);
        } catch (Exception e) {
            Seek.getPool().returnResource(jedis);
            throw new SeekException(e);
        }
View Full Code Here

                    pipeline.zrevrange(rkey, start, end);
                }
                List<byte[]> rawresult = null;
                if (cache == 0) {
                    pipeline.del(rkey, tmpkey);
                    List<Object> execute = pipeline.execute();
                    // get zrange or zrevrange result
                    rawresult = (List<byte[]>) execute.get(execute.size() - 2);
                    // get the last zunionstore output, which is the number of
                    // elements in the result
                    count = (Long) execute.get(execute.size() - 3);
View Full Code Here

                } else {
                    pipeline.del(tmpkey);
                    pipeline.rename(rkey, rkeyCached);
                    pipeline.expire(rkeyCached, cache);
                    pipeline.del(rkey);
                    List<Object> execute = pipeline.execute();
                    // get zrange or zrevrange result
                    rawresult = (List<byte[]>) execute.get(execute.size() - 5);
                    // get the last zunionstore output, which is the number of
                    // elements in the result
                    count = (Long) execute.get(execute.size() - 6);
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.