Package redis

Examples of redis.Command


  public Promise<Reply> sort(Object key0, Object[] pattern1) {
    if (version < SORT_VERSION) return new Promise<>(new RedisException("Server does not support SORT"));
    List<Object> list = new ArrayList<>();
    list.add(key0);
    Collections.addAll(list, pattern1);
    return execute(Reply.class, new Command(SORT_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here


  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<Reply> sort_(Object... arguments) {
    if (version < SORT_VERSION) return new Promise<>(new RedisException("Server does not support SORT"));
    return execute(Reply.class, new Command(SORT_BYTES, arguments));
  }
View Full Code Here

   * @param key0
   * @return IntegerReply
   */
  public Promise<IntegerReply> ttl(Object key0) {
    if (version < TTL_VERSION) return new Promise<>(new RedisException("Server does not support TTL"));
    return execute(IntegerReply.class, new Command(TTL_BYTES, key0));
  }
View Full Code Here

   * @param key0
   * @return StatusReply
   */
  public Promise<StatusReply> type(Object key0) {
    if (version < TYPE_VERSION) return new Promise<>(new RedisException("Server does not support TYPE"));
    return execute(StatusReply.class, new Command(TYPE_BYTES, key0));
  }
View Full Code Here

   *
   * @return StatusReply
   */
  public Promise<StatusReply> unwatch() {
    if (version < UNWATCH_VERSION) return new Promise<>(new RedisException("Server does not support UNWATCH"));
    return execute(StatusReply.class, new Command(UNWATCH_BYTES));
  }
View Full Code Here

   */
  public Promise<StatusReply> watch(Object[] key0) {
    if (version < WATCH_VERSION) return new Promise<>(new RedisException("Server does not support WATCH"));
    List<Object> list = new ArrayList<>();
    Collections.addAll(list, key0);
    return execute(StatusReply.class, new Command(WATCH_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<StatusReply> watch_(Object... arguments) {
    if (version < WATCH_VERSION) return new Promise<>(new RedisException("Server does not support WATCH"));
    return execute(StatusReply.class, new Command(WATCH_BYTES, arguments));
  }
View Full Code Here

    if (version < EVAL_VERSION) return new Promise<>(new RedisException("Server does not support EVAL"));
    List<Object> list = new ArrayList<>();
    list.add(script0);
    list.add(numkeys1);
    Collections.addAll(list, key2);
    return execute(Reply.class, new Command(EVAL_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<Reply> eval_(Object... arguments) {
    if (version < EVAL_VERSION) return new Promise<>(new RedisException("Server does not support EVAL"));
    return execute(Reply.class, new Command(EVAL_BYTES, arguments));
  }
View Full Code Here

    if (version < EVALSHA_VERSION) return new Promise<>(new RedisException("Server does not support EVALSHA"));
    List<Object> list = new ArrayList<>();
    list.add(sha10);
    list.add(numkeys1);
    Collections.addAll(list, key2);
    return execute(Reply.class, new Command(EVALSHA_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.