Package redis

Examples of redis.Command


    list.add(key0);
    list.add(min1);
    list.add(max2);
    if (withscores3 != null) list.add(withscores3);
    Collections.addAll(list, offset_or_count4);
    return execute(MultiBulkReply.class, new Command(ZRANGEBYSCORE_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here


  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<MultiBulkReply> zrangebyscore_(Object... arguments) {
    if (version < ZRANGEBYSCORE_VERSION) return new Promise<>(new RedisException("Server does not support ZRANGEBYSCORE"));
    return execute(MultiBulkReply.class, new Command(ZRANGEBYSCORE_BYTES, arguments));
  }
View Full Code Here

   * @param member1
   * @return Reply
   */
  public Promise<Reply> zrank(Object key0, Object member1) {
    if (version < ZRANK_VERSION) return new Promise<>(new RedisException("Server does not support ZRANK"));
    return execute(Reply.class, new Command(ZRANK_BYTES, key0, member1));
  }
View Full Code Here

  public Promise<IntegerReply> zrem(Object key0, Object[] member1) {
    if (version < ZREM_VERSION) return new Promise<>(new RedisException("Server does not support ZREM"));
    List<Object> list = new ArrayList<>();
    list.add(key0);
    Collections.addAll(list, member1);
    return execute(IntegerReply.class, new Command(ZREM_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<IntegerReply> zrem_(Object... arguments) {
    if (version < ZREM_VERSION) return new Promise<>(new RedisException("Server does not support ZREM"));
    return execute(IntegerReply.class, new Command(ZREM_BYTES, arguments));
  }
View Full Code Here

   * @param stop2
   * @return IntegerReply
   */
  public Promise<IntegerReply> zremrangebyrank(Object key0, Object start1, Object stop2) {
    if (version < ZREMRANGEBYRANK_VERSION) return new Promise<>(new RedisException("Server does not support ZREMRANGEBYRANK"));
    return execute(IntegerReply.class, new Command(ZREMRANGEBYRANK_BYTES, key0, start1, stop2));
  }
View Full Code Here

   * @param max2
   * @return IntegerReply
   */
  public Promise<IntegerReply> zremrangebyscore(Object key0, Object min1, Object max2) {
    if (version < ZREMRANGEBYSCORE_VERSION) return new Promise<>(new RedisException("Server does not support ZREMRANGEBYSCORE"));
    return execute(IntegerReply.class, new Command(ZREMRANGEBYSCORE_BYTES, key0, min1, max2));
  }
View Full Code Here

    List<Object> list = new ArrayList<>();
    list.add(key0);
    list.add(start1);
    list.add(stop2);
    if (withscores3 != null) list.add(withscores3);
    return execute(MultiBulkReply.class, new Command(ZREVRANGE_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<MultiBulkReply> zrevrange_(Object... arguments) {
    if (version < ZREVRANGE_VERSION) return new Promise<>(new RedisException("Server does not support ZREVRANGE"));
    return execute(MultiBulkReply.class, new Command(ZREVRANGE_BYTES, arguments));
  }
View Full Code Here

    list.add(key0);
    list.add(max1);
    list.add(min2);
    if (withscores3 != null) list.add(withscores3);
    Collections.addAll(list, offset_or_count4);
    return execute(MultiBulkReply.class, new Command(ZREVRANGEBYSCORE_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

TOP

Related Classes of redis.Command

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.