Package redis

Examples of redis.Command


   * @param value1
   * @return BulkReply
   */
  public BulkReply getset(Object key0, Object value1) throws RedisException {
    if (version < GETSET_VERSION) throw new RedisException("Server does not support GETSET");
    return (BulkReply) execute(GETSET, new Command(GETSET_BYTES, key0, value1));
  }
View Full Code Here


   * @param key0
   * @return IntegerReply
   */
  public IntegerReply incr(Object key0) throws RedisException {
    if (version < INCR_VERSION) throw new RedisException("Server does not support INCR");
    return (IntegerReply) execute(INCR, new Command(INCR_BYTES, key0));
  }
View Full Code Here

   * @param increment1
   * @return IntegerReply
   */
  public IntegerReply incrby(Object key0, Object increment1) throws RedisException {
    if (version < INCRBY_VERSION) throw new RedisException("Server does not support INCRBY");
    return (IntegerReply) execute(INCRBY, new Command(INCRBY_BYTES, key0, increment1));
  }
View Full Code Here

   * @param increment1
   * @return BulkReply
   */
  public BulkReply incrbyfloat(Object key0, Object increment1) throws RedisException {
    if (version < INCRBYFLOAT_VERSION) throw new RedisException("Server does not support INCRBYFLOAT");
    return (BulkReply) execute(INCRBYFLOAT, new Command(INCRBYFLOAT_BYTES, key0, increment1));
  }
View Full Code Here

   */
  public MultiBulkReply mget(Object... key0) throws RedisException {
    if (version < MGET_VERSION) throw new RedisException("Server does not support MGET");
    List list = new ArrayList();
    Collections.addAll(list, key0);
    return (MultiBulkReply) execute(MGET, new Command(MGET_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public MultiBulkReply mget_(Object... arguments) throws RedisException {
    if (version < MGET_VERSION) throw new RedisException("Server does not support MGET");
    return (MultiBulkReply) execute(MGET, new Command(MGET_BYTES, arguments));
  }
View Full Code Here

   */
  public StatusReply mset(Object... key_or_value0) throws RedisException {
    if (version < MSET_VERSION) throw new RedisException("Server does not support MSET");
    List list = new ArrayList();
    Collections.addAll(list, key_or_value0);
    return (StatusReply) execute(MSET, new Command(MSET_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

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

  public Promise<IntegerReply> sinterstore(Object destination0, Object[] key1) {
    if (version < SINTERSTORE_VERSION) return new Promise<>(new RedisException("Server does not support SINTERSTORE"));
    List<Object> list = new ArrayList<>();
    list.add(destination0);
    Collections.addAll(list, key1);
    return execute(IntegerReply.class, new Command(SINTERSTORE_BYTES, list.toArray(new Object[list.size()])));
  }
View Full Code Here

  }

  // Varargs version to simplify commands with optional or multiple arguments
  public Promise<IntegerReply> sinterstore_(Object... arguments) {
    if (version < SINTERSTORE_VERSION) return new Promise<>(new RedisException("Server does not support SINTERSTORE"));
    return execute(IntegerReply.class, new Command(SINTERSTORE_BYTES, arguments));
  }
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.