Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.rxjava.redis;
import java.util.Map;
import rx.Observable;
import io.vertx.redis.op.BitOperation;
import io.vertx.redis.op.ResetOptions;
import io.vertx.redis.op.ObjectCmd;
import io.vertx.redis.op.KillFilter;
import java.util.Map;
import io.vertx.redis.op.GeoUnit;
import io.vertx.core.json.JsonObject;
import io.vertx.core.AsyncResult;
import io.vertx.redis.op.RangeOptions;
import io.vertx.redis.op.GeoMember;
import io.vertx.redis.op.GeoRadiusOptions;
import io.vertx.redis.op.InsertOptions;
import io.vertx.redis.op.AggregateOptions;
import io.vertx.redis.op.SetOptions;
import io.vertx.redis.op.SortOptions;
import io.vertx.redis.op.MigrateOptions;
import io.vertx.redis.op.ScanOptions;
import io.vertx.rxjava.core.Vertx;
import io.vertx.redis.op.FailoverOptions;
import io.vertx.redis.op.SlotCmd;
import io.vertx.redis.op.RangeLimitOptions;
import io.vertx.redis.op.LimitOptions;
import io.vertx.core.json.JsonArray;
import java.util.List;
import io.vertx.rxjava.core.buffer.Buffer;
import io.vertx.redis.RedisOptions;
import io.vertx.core.Handler;
public class RedisClient {
final io.vertx.redis.RedisClient delegate;
public RedisClient(io.vertx.redis.RedisClient delegate) {
this.delegate = delegate;
}
public Object getDelegate() {
return delegate;
}
public static RedisClient create(Vertx vertx) {
RedisClient ret = RedisClient.newInstance(io.vertx.redis.RedisClient.create((io.vertx.core.Vertx)vertx.getDelegate()));
return ret;
}
public static RedisClient create(Vertx vertx, RedisOptions config) {
RedisClient ret = RedisClient.newInstance(io.vertx.redis.RedisClient.create((io.vertx.core.Vertx)vertx.getDelegate(), config));
return ret;
}
/**
* Close the client - when it is fully closed the handler will be called.
* @param handler
*/
public void close(Handler> handler) {
delegate.close(handler);
}
/**
* Close the client - when it is fully closed the handler will be called.
* @return
*/
public Observable closeObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
close(handler.toHandler());
return handler;
}
/**
* Append a value to a key
* @param key Key string
* @param value Value to append
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient append(String key, String value, Handler> handler) {
delegate.append(key, value, handler);
return this;
}
/**
* Append a value to a key
* @param key Key string
* @param value Value to append
* @return
*/
public Observable appendObservable(String key, String value) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
append(key, value, handler.toHandler());
return handler;
}
/**
* Authenticate to the server
* @param password Password for authentication
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient auth(String password, Handler> handler) {
delegate.auth(password, handler);
return this;
}
/**
* Authenticate to the server
* @param password Password for authentication
* @return
*/
public Observable authObservable(String password) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
auth(password, handler.toHandler());
return handler;
}
/**
* Asynchronously rewrite the append-only file
* @param handler
* @return
*/
public RedisClient bgrewriteaof(Handler> handler) {
delegate.bgrewriteaof(handler);
return this;
}
/**
* Asynchronously rewrite the append-only file
* @return
*/
public Observable bgrewriteaofObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bgrewriteaof(handler.toHandler());
return handler;
}
/**
* Asynchronously save the dataset to disk
* @param handler
* @return
*/
public RedisClient bgsave(Handler> handler) {
delegate.bgsave(handler);
return this;
}
/**
* Asynchronously save the dataset to disk
* @return
*/
public Observable bgsaveObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bgsave(handler.toHandler());
return handler;
}
/**
* Count set bits in a string
* @param key Key string
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient bitcount(String key, Handler> handler) {
delegate.bitcount(key, handler);
return this;
}
/**
* Count set bits in a string
* @param key Key string
* @return
*/
public Observable bitcountObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bitcount(key, handler.toHandler());
return handler;
}
/**
* Count set bits in a string
* @param key Key string
* @param start Start index
* @param end End index
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient bitcountRange(String key, long start, long end, Handler> handler) {
delegate.bitcountRange(key, start, end, handler);
return this;
}
/**
* Count set bits in a string
* @param key Key string
* @param start Start index
* @param end End index
* @return
*/
public Observable bitcountRangeObservable(String key, long start, long end) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bitcountRange(key, start, end, handler.toHandler());
return handler;
}
/**
* Perform bitwise operations between strings
* @param operation Bitwise operation to perform
* @param destkey Destination key where result is stored
* @param keys List of keys on which to perform the operation
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient bitop(BitOperation operation, String destkey, List keys, Handler> handler) {
delegate.bitop(operation, destkey, keys, handler);
return this;
}
/**
* Perform bitwise operations between strings
* @param operation Bitwise operation to perform
* @param destkey Destination key where result is stored
* @param keys List of keys on which to perform the operation
* @return
*/
public Observable bitopObservable(BitOperation operation, String destkey, List keys) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bitop(operation, destkey, keys, handler.toHandler());
return handler;
}
/**
* Find first bit set or clear in a string
* @param key Key string
* @param bit What bit value to look for - must be 1, or 0
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient bitpos(String key, int bit, Handler> handler) {
delegate.bitpos(key, bit, handler);
return this;
}
/**
* Find first bit set or clear in a string
* @param key Key string
* @param bit What bit value to look for - must be 1, or 0
* @return
*/
public Observable bitposObservable(String key, int bit) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bitpos(key, bit, handler.toHandler());
return handler;
}
/**
* Find first bit set or clear in a string
*
* See also bitposRange() method, which takes start, and stop offset.
* @param key Key string
* @param bit What bit value to look for - must be 1, or 0
* @param start Start offset
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient bitposFrom(String key, int bit, int start, Handler> handler) {
delegate.bitposFrom(key, bit, start, handler);
return this;
}
/**
* Find first bit set or clear in a string
*
* See also bitposRange() method, which takes start, and stop offset.
* @param key Key string
* @param bit What bit value to look for - must be 1, or 0
* @param start Start offset
* @return
*/
public Observable bitposFromObservable(String key, int bit, int start) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bitposFrom(key, bit, start, handler.toHandler());
return handler;
}
/**
* Find first bit set or clear in a string
*
* Note: when both start, and stop offsets are specified,
* behaviour is slightly different than if only start is specified
* @param key Key string
* @param bit What bit value to look for - must be 1, or 0
* @param start Start offset
* @param stop End offset - inclusive
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient bitposRange(String key, int bit, int start, int stop, Handler> handler) {
delegate.bitposRange(key, bit, start, stop, handler);
return this;
}
/**
* Find first bit set or clear in a string
*
* Note: when both start, and stop offsets are specified,
* behaviour is slightly different than if only start is specified
* @param key Key string
* @param bit What bit value to look for - must be 1, or 0
* @param start Start offset
* @param stop End offset - inclusive
* @return
*/
public Observable bitposRangeObservable(String key, int bit, int start, int stop) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
bitposRange(key, bit, start, stop, handler.toHandler());
return handler;
}
/**
* Remove and get the first element in a list, or block until one is available
* @param key Key string identifying a list to watch
* @param seconds Timeout in seconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient blpop(String key, int seconds, Handler> handler) {
delegate.blpop(key, seconds, handler);
return this;
}
/**
* Remove and get the first element in a list, or block until one is available
* @param key Key string identifying a list to watch
* @param seconds Timeout in seconds
* @return
*/
public Observable blpopObservable(String key, int seconds) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
blpop(key, seconds, handler.toHandler());
return handler;
}
/**
* Remove and get the first element in any of the lists, or block until one is available
* @param keys List of key strings identifying lists to watch
* @param seconds Timeout in seconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient blpopMany(List keys, int seconds, Handler> handler) {
delegate.blpopMany(keys, seconds, handler);
return this;
}
/**
* Remove and get the first element in any of the lists, or block until one is available
* @param keys List of key strings identifying lists to watch
* @param seconds Timeout in seconds
* @return
*/
public Observable blpopManyObservable(List keys, int seconds) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
blpopMany(keys, seconds, handler.toHandler());
return handler;
}
/**
* Remove and get the last element in a list, or block until one is available
* @param key Key string identifying a list to watch
* @param seconds Timeout in seconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient brpop(String key, int seconds, Handler> handler) {
delegate.brpop(key, seconds, handler);
return this;
}
/**
* Remove and get the last element in a list, or block until one is available
* @param key Key string identifying a list to watch
* @param seconds Timeout in seconds
* @return
*/
public Observable brpopObservable(String key, int seconds) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
brpop(key, seconds, handler.toHandler());
return handler;
}
/**
* Remove and get the last element in any of the lists, or block until one is available
* @param keys List of key strings identifying lists to watch
* @param seconds Timeout in seconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient brpopMany(List keys, int seconds, Handler> handler) {
delegate.brpopMany(keys, seconds, handler);
return this;
}
/**
* Remove and get the last element in any of the lists, or block until one is available
* @param keys List of key strings identifying lists to watch
* @param seconds Timeout in seconds
* @return
*/
public Observable brpopManyObservable(List keys, int seconds) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
brpopMany(keys, seconds, handler.toHandler());
return handler;
}
/**
* Pop a value from a list, push it to another list and return it; or block until one is available
* @param key Key string identifying the source list
* @param destkey Key string identifying the destination list
* @param seconds Timeout in seconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient brpoplpush(String key, String destkey, int seconds, Handler> handler) {
delegate.brpoplpush(key, destkey, seconds, handler);
return this;
}
/**
* Pop a value from a list, push it to another list and return it; or block until one is available
* @param key Key string identifying the source list
* @param destkey Key string identifying the destination list
* @param seconds Timeout in seconds
* @return
*/
public Observable brpoplpushObservable(String key, String destkey, int seconds) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
brpoplpush(key, destkey, seconds, handler.toHandler());
return handler;
}
/**
* Kill the connection of a client
* @param filter Filter options
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clientKill(KillFilter filter, Handler> handler) {
delegate.clientKill(filter, handler);
return this;
}
/**
* Kill the connection of a client
* @param filter Filter options
* @return
*/
public Observable clientKillObservable(KillFilter filter) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clientKill(filter, handler.toHandler());
return handler;
}
/**
* Get the list of client connections
* @param handler
* @return
*/
public RedisClient clientList(Handler> handler) {
delegate.clientList(handler);
return this;
}
/**
* Get the list of client connections
* @return
*/
public Observable clientListObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clientList(handler.toHandler());
return handler;
}
/**
* Get the current connection name
* @param handler
* @return
*/
public RedisClient clientGetname(Handler> handler) {
delegate.clientGetname(handler);
return this;
}
/**
* Get the current connection name
* @return
*/
public Observable clientGetnameObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clientGetname(handler.toHandler());
return handler;
}
/**
* Stop processing commands from clients for some time
* @param millis Pause time in milliseconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clientPause(long millis, Handler> handler) {
delegate.clientPause(millis, handler);
return this;
}
/**
* Stop processing commands from clients for some time
* @param millis Pause time in milliseconds
* @return
*/
public Observable clientPauseObservable(long millis) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clientPause(millis, handler.toHandler());
return handler;
}
/**
* Set the current connection name
* @param name New name for current connection
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clientSetname(String name, Handler> handler) {
delegate.clientSetname(name, handler);
return this;
}
/**
* Set the current connection name
* @param name New name for current connection
* @return
*/
public Observable clientSetnameObservable(String name) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clientSetname(name, handler.toHandler());
return handler;
}
/**
* Assign new hash slots to receiving node.
* @param slots
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterAddslots(List slots, Handler> handler) {
delegate.clusterAddslots(slots, handler);
return this;
}
/**
* Assign new hash slots to receiving node.
* @param slots
* @return
*/
public Observable clusterAddslotsObservable(List slots) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterAddslots(slots, handler.toHandler());
return handler;
}
/**
* Return the number of failure reports active for a given node.
* @param nodeId
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterCountFailureReports(String nodeId, Handler> handler) {
delegate.clusterCountFailureReports(nodeId, handler);
return this;
}
/**
* Return the number of failure reports active for a given node.
* @param nodeId
* @return
*/
public Observable clusterCountFailureReportsObservable(String nodeId) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterCountFailureReports(nodeId, handler.toHandler());
return handler;
}
/**
* Return the number of local keys in the specified hash slot.
* @param slot
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterCountkeysinslot(long slot, Handler> handler) {
delegate.clusterCountkeysinslot(slot, handler);
return this;
}
/**
* Return the number of local keys in the specified hash slot.
* @param slot
* @return
*/
public Observable clusterCountkeysinslotObservable(long slot) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterCountkeysinslot(slot, handler.toHandler());
return handler;
}
/**
* Set hash slots as unbound in receiving node.
* @param slot
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterDelslots(long slot, Handler> handler) {
delegate.clusterDelslots(slot, handler);
return this;
}
/**
* Set hash slots as unbound in receiving node.
* @param slot
* @return
*/
public Observable clusterDelslotsObservable(long slot) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterDelslots(slot, handler.toHandler());
return handler;
}
/**
* Set hash slots as unbound in receiving node.
* @param slots
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterDelslotsMany(List slots, Handler> handler) {
delegate.clusterDelslotsMany(slots, handler);
return this;
}
/**
* Set hash slots as unbound in receiving node.
* @param slots
* @return
*/
public Observable clusterDelslotsManyObservable(List slots) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterDelslotsMany(slots, handler.toHandler());
return handler;
}
/**
* Forces a slave to perform a manual failover of its master.
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterFailover(Handler> handler) {
delegate.clusterFailover(handler);
return this;
}
/**
* Forces a slave to perform a manual failover of its master.
* @return
*/
public Observable clusterFailoverObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterFailover(handler.toHandler());
return handler;
}
/**
* Forces a slave to perform a manual failover of its master.
* @param options
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterFailOverWithOptions(FailoverOptions options, Handler> handler) {
delegate.clusterFailOverWithOptions(options, handler);
return this;
}
/**
* Forces a slave to perform a manual failover of its master.
* @param options
* @return
*/
public Observable clusterFailOverWithOptionsObservable(FailoverOptions options) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterFailOverWithOptions(options, handler.toHandler());
return handler;
}
/**
* Remove a node from the nodes table.
* @param nodeId
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterForget(String nodeId, Handler> handler) {
delegate.clusterForget(nodeId, handler);
return this;
}
/**
* Remove a node from the nodes table.
* @param nodeId
* @return
*/
public Observable clusterForgetObservable(String nodeId) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterForget(nodeId, handler.toHandler());
return handler;
}
/**
* Return local key names in the specified hash slot.
* @param slot
* @param count
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterGetkeysinslot(long slot, long count, Handler> handler) {
delegate.clusterGetkeysinslot(slot, count, handler);
return this;
}
/**
* Return local key names in the specified hash slot.
* @param slot
* @param count
* @return
*/
public Observable clusterGetkeysinslotObservable(long slot, long count) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterGetkeysinslot(slot, count, handler.toHandler());
return handler;
}
/**
* Provides info about Redis Cluster node state.
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterInfo(Handler> handler) {
delegate.clusterInfo(handler);
return this;
}
/**
* Provides info about Redis Cluster node state.
* @return
*/
public Observable clusterInfoObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterInfo(handler.toHandler());
return handler;
}
/**
* Returns the hash slot of the specified key.
* @param key
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterKeyslot(String key, Handler> handler) {
delegate.clusterKeyslot(key, handler);
return this;
}
/**
* Returns the hash slot of the specified key.
* @param key
* @return
*/
public Observable clusterKeyslotObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterKeyslot(key, handler.toHandler());
return handler;
}
/**
* Force a node cluster to handshake with another node.
* @param ip
* @param port
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterMeet(String ip, long port, Handler> handler) {
delegate.clusterMeet(ip, port, handler);
return this;
}
/**
* Force a node cluster to handshake with another node.
* @param ip
* @param port
* @return
*/
public Observable clusterMeetObservable(String ip, long port) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterMeet(ip, port, handler.toHandler());
return handler;
}
/**
* Get Cluster config for the node.
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterNodes(Handler> handler) {
delegate.clusterNodes(handler);
return this;
}
/**
* Get Cluster config for the node.
* @return
*/
public Observable clusterNodesObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterNodes(handler.toHandler());
return handler;
}
/**
* Reconfigure a node as a slave of the specified master node.
* @param nodeId
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterReplicate(String nodeId, Handler> handler) {
delegate.clusterReplicate(nodeId, handler);
return this;
}
/**
* Reconfigure a node as a slave of the specified master node.
* @param nodeId
* @return
*/
public Observable clusterReplicateObservable(String nodeId) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterReplicate(nodeId, handler.toHandler());
return handler;
}
/**
* Reset a Redis Cluster node.
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterReset(Handler> handler) {
delegate.clusterReset(handler);
return this;
}
/**
* Reset a Redis Cluster node.
* @return
*/
public Observable clusterResetObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterReset(handler.toHandler());
return handler;
}
/**
* Reset a Redis Cluster node.
* @param options
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterResetWithOptions(ResetOptions options, Handler> handler) {
delegate.clusterResetWithOptions(options, handler);
return this;
}
/**
* Reset a Redis Cluster node.
* @param options
* @return
*/
public Observable clusterResetWithOptionsObservable(ResetOptions options) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterResetWithOptions(options, handler.toHandler());
return handler;
}
/**
* Forces the node to save cluster state on disk.
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterSaveconfig(Handler> handler) {
delegate.clusterSaveconfig(handler);
return this;
}
/**
* Forces the node to save cluster state on disk.
* @return
*/
public Observable clusterSaveconfigObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterSaveconfig(handler.toHandler());
return handler;
}
/**
* Set the configuration epoch in a new node.
* @param epoch
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterSetConfigEpoch(long epoch, Handler> handler) {
delegate.clusterSetConfigEpoch(epoch, handler);
return this;
}
/**
* Set the configuration epoch in a new node.
* @param epoch
* @return
*/
public Observable clusterSetConfigEpochObservable(long epoch) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterSetConfigEpoch(epoch, handler.toHandler());
return handler;
}
/**
* Bind an hash slot to a specific node.
* @param slot
* @param subcommand
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterSetslot(long slot, SlotCmd subcommand, Handler> handler) {
delegate.clusterSetslot(slot, subcommand, handler);
return this;
}
/**
* Bind an hash slot to a specific node.
* @param slot
* @param subcommand
* @return
*/
public Observable clusterSetslotObservable(long slot, SlotCmd subcommand) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterSetslot(slot, subcommand, handler.toHandler());
return handler;
}
/**
* Bind an hash slot to a specific node.
* @param slot
* @param subcommand
* @param nodeId
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterSetslotWithNode(long slot, SlotCmd subcommand, String nodeId, Handler> handler) {
delegate.clusterSetslotWithNode(slot, subcommand, nodeId, handler);
return this;
}
/**
* Bind an hash slot to a specific node.
* @param slot
* @param subcommand
* @param nodeId
* @return
*/
public Observable clusterSetslotWithNodeObservable(long slot, SlotCmd subcommand, String nodeId) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterSetslotWithNode(slot, subcommand, nodeId, handler.toHandler());
return handler;
}
/**
* List slave nodes of the specified master node.
* @param nodeId
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient clusterSlaves(String nodeId, Handler> handler) {
delegate.clusterSlaves(nodeId, handler);
return this;
}
/**
* List slave nodes of the specified master node.
* @param nodeId
* @return
*/
public Observable clusterSlavesObservable(String nodeId) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterSlaves(nodeId, handler.toHandler());
return handler;
}
/**
* Get array of Cluster slot to node mappings
* @param handler
* @return
*/
public RedisClient clusterSlots(Handler> handler) {
delegate.clusterSlots(handler);
return this;
}
/**
* Get array of Cluster slot to node mappings
* @return
*/
public Observable clusterSlotsObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
clusterSlots(handler.toHandler());
return handler;
}
/**
* Get array of Redis command details
* @param handler
* @return
*/
public RedisClient command(Handler> handler) {
delegate.command(handler);
return this;
}
/**
* Get array of Redis command details
* @return
*/
public Observable commandObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
command(handler.toHandler());
return handler;
}
/**
* Get total number of Redis commands
* @param handler
* @return
*/
public RedisClient commandCount(Handler> handler) {
delegate.commandCount(handler);
return this;
}
/**
* Get total number of Redis commands
* @return
*/
public Observable commandCountObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
commandCount(handler.toHandler());
return handler;
}
/**
* Extract keys given a full Redis command
* @param handler
* @return
*/
public RedisClient commandGetkeys(Handler> handler) {
delegate.commandGetkeys(handler);
return this;
}
/**
* Extract keys given a full Redis command
* @return
*/
public Observable commandGetkeysObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
commandGetkeys(handler.toHandler());
return handler;
}
/**
* Get array of specific Redis command details
* @param commands List of commands to get info for
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient commandInfo(List commands, Handler> handler) {
delegate.commandInfo(commands, handler);
return this;
}
/**
* Get array of specific Redis command details
* @param commands List of commands to get info for
* @return
*/
public Observable commandInfoObservable(List commands) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
commandInfo(commands, handler.toHandler());
return handler;
}
/**
* Get the value of a configuration parameter
* @param parameter Configuration parameter
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient configGet(String parameter, Handler> handler) {
delegate.configGet(parameter, handler);
return this;
}
/**
* Get the value of a configuration parameter
* @param parameter Configuration parameter
* @return
*/
public Observable configGetObservable(String parameter) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
configGet(parameter, handler.toHandler());
return handler;
}
/**
* Rewrite the configuration file with the in memory configuration
* @param handler
* @return
*/
public RedisClient configRewrite(Handler> handler) {
delegate.configRewrite(handler);
return this;
}
/**
* Rewrite the configuration file with the in memory configuration
* @return
*/
public Observable configRewriteObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
configRewrite(handler.toHandler());
return handler;
}
/**
* Set a configuration parameter to the given value
* @param parameter Configuration parameter
* @param value New value
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient configSet(String parameter, String value, Handler> handler) {
delegate.configSet(parameter, value, handler);
return this;
}
/**
* Set a configuration parameter to the given value
* @param parameter Configuration parameter
* @param value New value
* @return
*/
public Observable configSetObservable(String parameter, String value) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
configSet(parameter, value, handler.toHandler());
return handler;
}
/**
* Reset the stats returned by INFO
* @param handler
* @return
*/
public RedisClient configResetstat(Handler> handler) {
delegate.configResetstat(handler);
return this;
}
/**
* Reset the stats returned by INFO
* @return
*/
public Observable configResetstatObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
configResetstat(handler.toHandler());
return handler;
}
/**
* Return the number of keys in the selected database
* @param handler
* @return
*/
public RedisClient dbsize(Handler> handler) {
delegate.dbsize(handler);
return this;
}
/**
* Return the number of keys in the selected database
* @return
*/
public Observable dbsizeObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
dbsize(handler.toHandler());
return handler;
}
/**
* Get debugging information about a key
* @param key Key string
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient debugObject(String key, Handler> handler) {
delegate.debugObject(key, handler);
return this;
}
/**
* Get debugging information about a key
* @param key Key string
* @return
*/
public Observable debugObjectObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
debugObject(key, handler.toHandler());
return handler;
}
/**
* Make the server crash
* @param handler
* @return
*/
public RedisClient debugSegfault(Handler> handler) {
delegate.debugSegfault(handler);
return this;
}
/**
* Make the server crash
* @return
*/
public Observable debugSegfaultObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
debugSegfault(handler.toHandler());
return handler;
}
/**
* Decrement the integer value of a key by one
* @param key Key string
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient decr(String key, Handler> handler) {
delegate.decr(key, handler);
return this;
}
/**
* Decrement the integer value of a key by one
* @param key Key string
* @return
*/
public Observable decrObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
decr(key, handler.toHandler());
return handler;
}
/**
* Decrement the integer value of a key by the given number
* @param key Key string
* @param decrement Value by which to decrement
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient decrby(String key, long decrement, Handler> handler) {
delegate.decrby(key, decrement, handler);
return this;
}
/**
* Decrement the integer value of a key by the given number
* @param key Key string
* @param decrement Value by which to decrement
* @return
*/
public Observable decrbyObservable(String key, long decrement) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
decrby(key, decrement, handler.toHandler());
return handler;
}
/**
* Delete a key
* @param key Keys to delete
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient del(String key, Handler> handler) {
delegate.del(key, handler);
return this;
}
/**
* Delete a key
* @param key Keys to delete
* @return
*/
public Observable delObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
del(key, handler.toHandler());
return handler;
}
/**
* Delete many keys
* @param keys List of keys to delete
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient delMany(List keys, Handler> handler) {
delegate.delMany(keys, handler);
return this;
}
/**
* Delete many keys
* @param keys List of keys to delete
* @return
*/
public Observable delManyObservable(List keys) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
delMany(keys, handler.toHandler());
return handler;
}
/**
* Return a serialized version of the value stored at the specified key.
* @param key Key string
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient dump(String key, Handler> handler) {
delegate.dump(key, handler);
return this;
}
/**
* Return a serialized version of the value stored at the specified key.
* @param key Key string
* @return
*/
public Observable dumpObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
dump(key, handler.toHandler());
return handler;
}
/**
* Echo the given string
* @param message String to echo
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient echo(String message, Handler> handler) {
delegate.echo(message, handler);
return this;
}
/**
* Echo the given string
* @param message String to echo
* @return
*/
public Observable echoObservable(String message) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
echo(message, handler.toHandler());
return handler;
}
/**
* Execute a Lua script server side. Due to the dynamic nature of this command any response type could be returned
* for This reason and to ensure type safety the reply is always guaranteed to be a JsonArray.
*
* When a reply if for example a String the handler will be called with a JsonArray with a single element containing
* the String.
* @param script Lua script to evaluate
* @param keys List of keys
* @param args List of argument values
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient eval(String script, List keys, List args, Handler> handler) {
delegate.eval(script, keys, args, handler);
return this;
}
/**
* Execute a Lua script server side. Due to the dynamic nature of this command any response type could be returned
* for This reason and to ensure type safety the reply is always guaranteed to be a JsonArray.
*
* When a reply if for example a String the handler will be called with a JsonArray with a single element containing
* the String.
* @param script Lua script to evaluate
* @param keys List of keys
* @param args List of argument values
* @return
*/
public Observable evalObservable(String script, List keys, List args) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
eval(script, keys, args, handler.toHandler());
return handler;
}
/**
* Execute a Lua script server side. Due to the dynamic nature of this command any response type could be returned
* for This reason and to ensure type safety the reply is always guaranteed to be a JsonArray.
*
* When a reply if for example a String the handler will be called with a JsonArray with a single element containing
* the String.
* @param sha1 SHA1 digest of the script cached on the server
* @param keys List of keys
* @param values List of values
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient evalsha(String sha1, List keys, List values, Handler> handler) {
delegate.evalsha(sha1, keys, values, handler);
return this;
}
/**
* Execute a Lua script server side. Due to the dynamic nature of this command any response type could be returned
* for This reason and to ensure type safety the reply is always guaranteed to be a JsonArray.
*
* When a reply if for example a String the handler will be called with a JsonArray with a single element containing
* the String.
* @param sha1 SHA1 digest of the script cached on the server
* @param keys List of keys
* @param values List of values
* @return
*/
public Observable evalshaObservable(String sha1, List keys, List values) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
evalsha(sha1, keys, values, handler.toHandler());
return handler;
}
/**
* Determine if a key exists
* @param key Key string
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient exists(String key, Handler> handler) {
delegate.exists(key, handler);
return this;
}
/**
* Determine if a key exists
* @param key Key string
* @return
*/
public Observable existsObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
exists(key, handler.toHandler());
return handler;
}
/**
* Set a key's time to live in seconds
* @param key Key string
* @param seconds Time to live in seconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient expire(String key, int seconds, Handler> handler) {
delegate.expire(key, seconds, handler);
return this;
}
/**
* Set a key's time to live in seconds
* @param key Key string
* @param seconds Time to live in seconds
* @return
*/
public Observable expireObservable(String key, int seconds) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
expire(key, seconds, handler.toHandler());
return handler;
}
/**
* Set the expiration for a key as a UNIX timestamp
* @param key Key string
* @param seconds Expiry time as Unix timestamp in seconds
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient expireat(String key, long seconds, Handler> handler) {
delegate.expireat(key, seconds, handler);
return this;
}
/**
* Set the expiration for a key as a UNIX timestamp
* @param key Key string
* @param seconds Expiry time as Unix timestamp in seconds
* @return
*/
public Observable expireatObservable(String key, long seconds) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
expireat(key, seconds, handler.toHandler());
return handler;
}
/**
* Remove all keys from all databases
* @param handler
* @return
*/
public RedisClient flushall(Handler> handler) {
delegate.flushall(handler);
return this;
}
/**
* Remove all keys from all databases
* @return
*/
public Observable flushallObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
flushall(handler.toHandler());
return handler;
}
/**
* Remove all keys from the current database
* @param handler
* @return
*/
public RedisClient flushdb(Handler> handler) {
delegate.flushdb(handler);
return this;
}
/**
* Remove all keys from the current database
* @return
*/
public Observable flushdbObservable() {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
flushdb(handler.toHandler());
return handler;
}
/**
* Get the value of a key
* @param key Key string
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient get(String key, Handler> handler) {
delegate.get(key, handler);
return this;
}
/**
* Get the value of a key
* @param key Key string
* @return
*/
public Observable getObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
get(key, handler.toHandler());
return handler;
}
/**
* Get the value of a key - without decoding as utf-8
* @param key Key string
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient getBinary(String key, Handler> handler) {
delegate.getBinary(key, new Handler>() {
public void handle(AsyncResult ar) {
if (ar.succeeded()) {
handler.handle(io.vertx.core.Future.succeededFuture(Buffer.newInstance(ar.result())));
} else {
handler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
}
}
});
return this;
}
/**
* Get the value of a key - without decoding as utf-8
* @param key Key string
* @return
*/
public Observable getBinaryObservable(String key) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
getBinary(key, handler.toHandler());
return handler;
}
/**
* Returns the bit value at offset in the string value stored at key
* @param key Key string
* @param offset Offset in bits
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient getbit(String key, long offset, Handler> handler) {
delegate.getbit(key, offset, handler);
return this;
}
/**
* Returns the bit value at offset in the string value stored at key
* @param key Key string
* @param offset Offset in bits
* @return
*/
public Observable getbitObservable(String key, long offset) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
getbit(key, offset, handler.toHandler());
return handler;
}
/**
* Get a substring of the string stored at a key
* @param key Key string
* @param start Start offset
* @param end End offset - inclusive
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient getrange(String key, long start, long end, Handler> handler) {
delegate.getrange(key, start, end, handler);
return this;
}
/**
* Get a substring of the string stored at a key
* @param key Key string
* @param start Start offset
* @param end End offset - inclusive
* @return
*/
public Observable getrangeObservable(String key, long start, long end) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
getrange(key, start, end, handler.toHandler());
return handler;
}
/**
* Set the string value of a key and return its old value
* @param key Key of which value to set
* @param value New value for the key
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient getset(String key, String value, Handler> handler) {
delegate.getset(key, value, handler);
return this;
}
/**
* Set the string value of a key and return its old value
* @param key Key of which value to set
* @param value New value for the key
* @return
*/
public Observable getsetObservable(String key, String value) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
getset(key, value, handler.toHandler());
return handler;
}
/**
* Delete one or more hash fields
* @param key Key string
* @param field Field name
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient hdel(String key, String field, Handler> handler) {
delegate.hdel(key, field, handler);
return this;
}
/**
* Delete one or more hash fields
* @param key Key string
* @param field Field name
* @return
*/
public Observable hdelObservable(String key, String field) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
hdel(key, field, handler.toHandler());
return handler;
}
/**
* Delete one or more hash fields
* @param key Key string
* @param fields Field names
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient hdelMany(String key, List fields, Handler> handler) {
delegate.hdelMany(key, fields, handler);
return this;
}
/**
* Delete one or more hash fields
* @param key Key string
* @param fields Field names
* @return
*/
public Observable hdelManyObservable(String key, List fields) {
io.vertx.rx.java.ObservableFuture handler = io.vertx.rx.java.RxHelper.observableFuture();
hdelMany(key, fields, handler.toHandler());
return handler;
}
/**
* Determine if a hash field exists
* @param key Key string
* @param field Field name
* @param handler Handler for the result of this call.
* @return
*/
public RedisClient hexists(String key, String field, Handler> handler) {
delegate.hexists(key, field, handler);
return this;
}
/**
* Determine if a hash field exists
* @param key Key string
* @param field Field name
* @return
*/
public Observable hexistsObservable(String key, String field) {
io.vertx.rx.java.ObservableFuture