Package redis.clients.jedis

Examples of redis.clients.jedis.SortingParams.desc()


  jedis.lpush("foo", "3");
  jedis.lpush("foo", "2");
  jedis.lpush("foo", "1");

  SortingParams sp = new SortingParams();
  sp.desc();

  List<String> result = jedis.sort("foo", sp);

  List<String> expected = new ArrayList<String>();
  expected.add("3");
View Full Code Here


  jedis.lpush(bfoo, b3);
  jedis.lpush(bfoo, b2);
  jedis.lpush(bfoo, b1);

  SortingParams bsp = new SortingParams();
  bsp.desc();

  List<byte[]> bresult = jedis.sort(bfoo, bsp);

  List<byte[]> bexpected = new ArrayList<byte[]>();
  bexpected.add(b3);
View Full Code Here

      if (limit != null) {
        jedisParams.limit((int) limit.getStart(), (int) limit.getCount());
      }
      Order order = params.getOrder();
      if (order != null && order.equals(Order.DESC)) {
        jedisParams.desc();
      }
      Boolean isAlpha = params.isAlphabetic();
      if (isAlpha != null && isAlpha) {
        jedisParams.alpha();
      }
View Full Code Here

        Transaction trans = conn.multi();
        trans.scard("idx:" + id);
        SortingParams params = new SortingParams();
        if (desc) {
            params.desc();
        }
        if (alpha){
            params.alpha();
        }
        params.by(by);
View Full Code Here

      if (limit != null) {
        jedisParams.limit((int) limit.getStart(), (int) limit.getCount());
      }
      Order order = params.getOrder();
      if (order != null && order.equals(Order.DESC)) {
        jedisParams.desc();
      }
      Boolean isAlpha = params.isAlphabetic();
      if (isAlpha != null && isAlpha) {
        jedisParams.alpha();
      }
View Full Code Here

      if (limit != null) {
        jedisParams.limit((int) limit.getStart(), (int) limit.getCount());
      }
      Order order = params.getOrder();
      if (order != null && order.equals(Order.DESC)) {
        jedisParams.desc();
      }
      Boolean isAlpha = params.isAlphabetic();
      if (isAlpha != null && isAlpha) {
        jedisParams.alpha();
      }
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.