/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you under the Apache License, version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package io.vertx.reactivex.redis.client;

import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.Completable;
import io.reactivex.Maybe;

Builder for REDIS requests that will be encoded according to the RESP protocol was introduced in Redis 1.2. Which became the standard way for talking with the Redis server in Redis 2.0. Redis protocol documentation states:
Clients send commands to a Redis server as a RESP Array of Bulk Strings.
So all non String/Bulk types will be encoded to Bulk for convenience.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
/** * Builder for REDIS requests that will be encoded according to the RESP protocol was introduced in Redis 1.2. * Which became the standard way for talking with the Redis server in Redis 2.0. * * Redis <a href="https://redis.io/topics/protocol">protocol documentation</a> states: * * <blockquote> * Clients send commands to a Redis server as a RESP Array of Bulk Strings. * </blockquote> * * So all non String/Bulk types will be encoded to Bulk for convenience. * * <p/> * NOTE: This class has been automatically generated from the {@link io.vertx.redis.client.Request original} non RX-ified interface using Vert.x codegen. */
@io.vertx.lang.rx.RxGen(io.vertx.redis.client.Request.class) public class Request { @Override public String toString() { return delegate.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Request that = (Request) o; return delegate.equals(that.delegate); } @Override public int hashCode() { return delegate.hashCode(); } public static final io.vertx.lang.rx.TypeArg<Request> __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>( obj -> new Request((io.vertx.redis.client.Request) obj), Request::getDelegate ); private final io.vertx.redis.client.Request delegate; public Request(io.vertx.redis.client.Request delegate) { this.delegate = delegate; } public io.vertx.redis.client.Request getDelegate() { return delegate; } public static io.vertx.reactivex.redis.client.Request cmd(io.vertx.reactivex.redis.client.Command command) { io.vertx.reactivex.redis.client.Request ret = io.vertx.reactivex.redis.client.Request.newInstance(io.vertx.redis.client.Request.cmd(command.getDelegate())); return ret; }
Adds a String argument using UTF8 character encoding
Params:
  • arg –
Returns:self
/** * Adds a String argument using UTF8 character encoding * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(String arg) { delegate.arg(arg); return this; }
Adds a String using a specific character encoding argument
Params:
  • arg –
  • enc –
Returns:self
/** * Adds a String using a specific character encoding argument * @param arg * @param enc * @return self */
public io.vertx.reactivex.redis.client.Request arg(String arg, String enc) { delegate.arg(arg, enc); return this; }
Adds a String key argument
Params:
  • arg –
Returns:self
/** * Adds a String key argument * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(io.vertx.reactivex.core.buffer.Buffer arg) { delegate.arg(arg.getDelegate()); return this; }
Adds a long encoded to string
Params:
  • arg –
Returns:self
/** * Adds a long encoded to string * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(long arg) { delegate.arg(arg); return this; }
Adds a boolean encoded to string
Params:
  • arg –
Returns:self
/** * Adds a boolean encoded to string * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(boolean arg) { delegate.arg(arg); return this; }
Adds a NULL encoded string
Returns:self
/** * Adds a NULL encoded string * @return self */
public io.vertx.reactivex.redis.client.Request nullArg() { delegate.nullArg(); return this; }
Get the Command that is to be used by this request.
Returns:the command.
/** * Get the Command that is to be used by this request. * @return the command. */
public io.vertx.reactivex.redis.client.Command command() { io.vertx.reactivex.redis.client.Command ret = io.vertx.reactivex.redis.client.Command.newInstance(delegate.command()); return ret; }
Adds a byte array
Params:
  • arg –
Returns:self
/** * Adds a byte array * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(byte[] arg) { delegate.arg(arg); return this; }
Adds a int encoded to string
Params:
  • arg –
Returns:self
/** * Adds a int encoded to string * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(int arg) { delegate.arg(arg); return this; }
Adds a short encoded to string
Params:
  • arg –
Returns:self
/** * Adds a short encoded to string * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(short arg) { delegate.arg(arg); return this; }
Adds a byte encoded to string
Params:
  • arg –
Returns:self
/** * Adds a byte encoded to string * @param arg * @return self */
public io.vertx.reactivex.redis.client.Request arg(byte arg) { delegate.arg(arg); return this; } public static Request newInstance(io.vertx.redis.client.Request arg) { return arg != null ? new Request(arg) : null; } }