Package redis

Examples of redis.Command


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


  }

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

   * @param key0
   * @return BulkReply
   */
  public Promise<BulkReply> dump(Object key0) {
    if (version < DUMP_VERSION) return new Promise<>(new RedisException("Server does not support DUMP"));
    return execute(BulkReply.class, new Command(DUMP_BYTES, key0));
  }
View Full Code Here

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

   * @param seconds1
   * @return IntegerReply
   */
  public Promise<IntegerReply> expire(Object key0, Object seconds1) {
    if (version < EXPIRE_VERSION) return new Promise<>(new RedisException("Server does not support EXPIRE"));
    return execute(IntegerReply.class, new Command(EXPIRE_BYTES, key0, seconds1));
  }
View Full Code Here

   * @param timestamp1
   * @return IntegerReply
   */
  public Promise<IntegerReply> expireat(Object key0, Object timestamp1) {
    if (version < EXPIREAT_VERSION) return new Promise<>(new RedisException("Server does not support EXPIREAT"));
    return execute(IntegerReply.class, new Command(EXPIREAT_BYTES, key0, timestamp1));
  }
View Full Code Here

   * @param pattern0
   * @return MultiBulkReply
   */
  public Promise<MultiBulkReply> keys(Object pattern0) {
    if (version < KEYS_VERSION) return new Promise<>(new RedisException("Server does not support KEYS"));
    return execute(MultiBulkReply.class, new Command(KEYS_BYTES, pattern0));
  }
View Full Code Here

    list.add(host0);
    list.add(port1);
    list.add(key2);
    list.add(destination_db3);
    list.add(timeout4);
    return execute(StatusReply.class, new Command(MIGRATE_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

   * @param db1
   * @return IntegerReply
   */
  public Promise<IntegerReply> move(Object key0, Object db1) {
    if (version < MOVE_VERSION) return new Promise<>(new RedisException("Server does not support MOVE"));
    return execute(IntegerReply.class, new Command(MOVE_BYTES, key0, db1));
  }
View Full Code Here

  public Promise<Reply> object(Object subcommand0, Object[] arguments1) {
    if (version < OBJECT_VERSION) return new Promise<>(new RedisException("Server does not support OBJECT"));
    List<Object> list = new ArrayList<>();
    list.add(subcommand0);
    Collections.addAll(list, arguments1);
    return execute(Reply.class, new Command(OBJECT_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.