Package redis.clients.jedis

Examples of redis.clients.jedis.ZParams


            trans.zadd(tkey1, value, "min");
            trans.zadd(tkey2, value, "max");

            trans.zunionstore(
                destination,
                new ZParams().aggregate(ZParams.Aggregate.MIN),
                destination, tkey1);
            trans.zunionstore(
                destination,
                new ZParams().aggregate(ZParams.Aggregate.MAX),
                destination, tkey2);

            trans.del(tkey1, tkey2);
            trans.zincrby(destination, 1, "count");
            trans.zincrby(destination, value, "sum");
View Full Code Here


    }

    public List<Map<String,String>> getGroupArticles(Jedis conn, String group, int page, String order) {
        String key = order + group;
        if (!conn.exists(key)) {
            ZParams params = new ZParams().aggregate(ZParams.Aggregate.MAX);
            conn.zinterstore(key, params, "group:" + group, order);
            conn.expire(key, 60);
        }
        return getArticles(conn, page, key);
    }
View Full Code Here

    }
  }

  public Long zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) {
    try {
      ZParams zparams = new ZParams().weights(weights).aggregate(ZParams.Aggregate.valueOf(aggregate.name()));

      if (isPipelined()) {
        pipeline(new JedisResult(pipeline.zinterstore(destKey, zparams, sets)));
        return null;
      }
View Full Code Here

    }
  }

  public Long zUnionStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) {
    try {
      ZParams zparams = new ZParams().weights(weights).aggregate(ZParams.Aggregate.valueOf(aggregate.name()));

      if (isPipelined()) {
        pipeline(new JedisResult(pipeline.zunionstore(destKey, zparams, sets)));
        return null;
      }
View Full Code Here

        String rkey = index.cat(Seek.QUERIES).cat(query)
                .cat(Seek.QUERIES_RESULT).cat(String.valueOf(Thread.currentThread().getId())).key();
        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;
View Full Code Here

TOP

Related Classes of redis.clients.jedis.ZParams

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.