All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.jedis.MultiKeyPipelineBase Maven / Gradle / Ivy

The newest version!
package redis.clients.jedis;

import java.util.List;
import java.util.Map;
import java.util.Set;

abstract class MultiKeyPipelineBase extends PipelineBase implements
        BasicRedisPipeline,
        MultiKeyBinaryRedisPipeline,
        MultiKeyCommandsPipeline {

    protected Client client = null;

    public Response> brpop(String... args) {
        client.brpop(args);
        return getResponse(BuilderFactory.STRING_LIST);
    }
    
    public Response> brpop(int timeout, String... keys) {
        client.brpop(timeout, keys);
        return getResponse(BuilderFactory.STRING_LIST);
    }

    public Response> blpop(String... args) {
        client.blpop(args);
        return getResponse(BuilderFactory.STRING_LIST);
    }
    
    public Response> blpop(int timeout, String... keys) {
        client.blpop(timeout, keys);
        return getResponse(BuilderFactory.STRING_LIST);
    }
    
    public Response> blpopMap(int timeout, String... keys) {
        client.blpop(timeout, keys);
        return getResponse(BuilderFactory.STRING_MAP);
    }

    public Response> brpop(byte[]... args) {
        client.brpop(args);
        return getResponse(BuilderFactory.BYTE_ARRAY_LIST);
    }
    
    public Response> brpop(int timeout, byte[]... keys) {
        client.brpop(timeout, keys);
        return getResponse(BuilderFactory.STRING_LIST);
    }
    
    public Response> brpopMap(int timeout, String... keys) {
        client.blpop(timeout, keys);
        return getResponse(BuilderFactory.STRING_MAP);
    }

    public Response> blpop(byte[]... args) {
        client.blpop(args);
        return getResponse(BuilderFactory.BYTE_ARRAY_LIST);
    }
    
    public Response> blpop(int timeout, byte[]... keys) {
        client.blpop(timeout, keys);
        return getResponse(BuilderFactory.STRING_LIST);
    }

    public Response del(String... keys) {
        client.del(keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response del(byte[]... keys) {
        client.del(keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response> keys(String pattern) {
        getClient(pattern).keys(pattern);
        return getResponse(BuilderFactory.STRING_SET);
    }

    public Response> keys(byte[] pattern) {
        getClient(pattern).keys(pattern);
        return getResponse(BuilderFactory.BYTE_ARRAY_ZSET);
    }

    public Response> mget(String... keys) {
        client.mget(keys);
        return getResponse(BuilderFactory.STRING_LIST);
    }

    public Response> mget(byte[]... keys) {
        client.mget(keys);
        return getResponse(BuilderFactory.BYTE_ARRAY_LIST);
    }

    public Response mset(String... keysvalues) {
        client.mset(keysvalues);
        return getResponse(BuilderFactory.STRING);
    }

    public Response mset(byte[]... keysvalues) {
        client.mset(keysvalues);
        return getResponse(BuilderFactory.STRING);
    }

    public Response msetnx(String... keysvalues) {
        client.msetnx(keysvalues);
        return getResponse(BuilderFactory.LONG);
    }

    public Response msetnx(byte[]... keysvalues) {
        client.msetnx(keysvalues);
        return getResponse(BuilderFactory.LONG);
    }

    public Response rename(String oldkey, String newkey) {
        client.rename(oldkey, newkey);
        return getResponse(BuilderFactory.STRING);
    }

    public Response rename(byte[] oldkey, byte[] newkey) {
        client.rename(oldkey, newkey);
        return getResponse(BuilderFactory.STRING);
    }

    public Response renamenx(String oldkey, String newkey) {
        client.renamenx(oldkey, newkey);
        return getResponse(BuilderFactory.LONG);
    }

    public Response renamenx(byte[] oldkey, byte[] newkey) {
        client.renamenx(oldkey, newkey);
        return getResponse(BuilderFactory.LONG);
    }

    public Response rpoplpush(String srckey, String dstkey) {
        client.rpoplpush(srckey, dstkey);
        return getResponse(BuilderFactory.STRING);
    }

    public Response rpoplpush(byte[] srckey, byte[] dstkey) {
        client.rpoplpush(srckey, dstkey);
        return getResponse(BuilderFactory.BYTE_ARRAY);
    }

    public Response> sdiff(String... keys) {
        client.sdiff(keys);
        return getResponse(BuilderFactory.STRING_SET);
    }

    public Response> sdiff(byte[]... keys) {
        client.sdiff(keys);
        return getResponse(BuilderFactory.BYTE_ARRAY_ZSET);
    }

    public Response sdiffstore(String dstkey, String... keys) {
        client.sdiffstore(dstkey, keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response sdiffstore(byte[] dstkey, byte[]... keys) {
        client.sdiffstore(dstkey, keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response> sinter(String... keys) {
        client.sinter(keys);
        return getResponse(BuilderFactory.STRING_SET);
    }

    public Response> sinter(byte[]... keys) {
        client.sinter(keys);
        return getResponse(BuilderFactory.BYTE_ARRAY_ZSET);
    }

    public Response sinterstore(String dstkey, String... keys) {
        client.sinterstore(dstkey, keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response sinterstore(byte[] dstkey, byte[]... keys) {
        client.sinterstore(dstkey, keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response smove(String srckey, String dstkey, String member) {
        client.smove(srckey, dstkey, member);
        return getResponse(BuilderFactory.LONG);
    }

    public Response smove(byte[] srckey, byte[] dstkey, byte[] member) {
        client.smove(srckey, dstkey, member);
        return getResponse(BuilderFactory.LONG);
    }

    public Response sort(String key,
                                       SortingParams sortingParameters, String dstkey) {
        client.sort(key, sortingParameters, dstkey);
        return getResponse(BuilderFactory.LONG);
    }

    public Response sort(byte[] key,
                                       SortingParams sortingParameters, byte[] dstkey) {
        client.sort(key, sortingParameters, dstkey);
        return getResponse(BuilderFactory.LONG);
    }

    public Response sort(String key, String dstkey) {
        client.sort(key, dstkey);
        return getResponse(BuilderFactory.LONG);
    }

    public Response sort(byte[] key, byte[] dstkey) {
        client.sort(key, dstkey);
        return getResponse(BuilderFactory.LONG);
    }

    public Response> sunion(String... keys) {
        client.sunion(keys);
        return getResponse(BuilderFactory.STRING_SET);
    }

    public Response> sunion(byte[]... keys) {
        client.sunion(keys);
        return getResponse(BuilderFactory.BYTE_ARRAY_ZSET);
    }

    public Response sunionstore(String dstkey, String... keys) {
        client.sunionstore(dstkey, keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response sunionstore(byte[] dstkey, byte[]... keys) {
        client.sunionstore(dstkey, keys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response watch(String... keys) {
        client.watch(keys);
        return getResponse(BuilderFactory.STRING);
    }

    public Response watch(byte[]... keys) {
        client.watch(keys);
        return getResponse(BuilderFactory.STRING);
    }

    public Response zinterstore(String dstkey, String... sets) {
        client.zinterstore(dstkey, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response zinterstore(byte[] dstkey, byte[]... sets) {
        client.zinterstore(dstkey, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response zinterstore(String dstkey, ZParams params,
                                      String... sets) {
        client.zinterstore(dstkey, params, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response zinterstore(byte[] dstkey, ZParams params,
                                      byte[]... sets) {
        client.zinterstore(dstkey, params, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response zunionstore(String dstkey, String... sets) {
        client.zunionstore(dstkey, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response zunionstore(byte[] dstkey, byte[]... sets) {
        client.zunionstore(dstkey, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response zunionstore(String dstkey, ZParams params,
                                      String... sets) {
        client.zunionstore(dstkey, params, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response zunionstore(byte[] dstkey, ZParams params,
                                      byte[]... sets) {
        client.zunionstore(dstkey, params, sets);
        return getResponse(BuilderFactory.LONG);
    }

    public Response bgrewriteaof() {
        client.bgrewriteaof();
        return getResponse(BuilderFactory.STRING);
    }

    public Response bgsave() {
        client.bgsave();
        return getResponse(BuilderFactory.STRING);
    }

    public Response configGet(String pattern) {
        client.configGet(pattern);
        return getResponse(BuilderFactory.STRING);
    }

    public Response configSet(String parameter, String value) {
        client.configSet(parameter, value);
        return getResponse(BuilderFactory.STRING);
    }

    public Response brpoplpush(String source, String destination,
                                       int timeout) {
        client.brpoplpush(source, destination, timeout);
        return getResponse(BuilderFactory.STRING);
    }

    public Response brpoplpush(byte[] source, byte[] destination,
                                       int timeout) {
        client.brpoplpush(source, destination, timeout);
        return getResponse(BuilderFactory.BYTE_ARRAY);
    }

    public Response configResetStat() {
        client.configResetStat();
        return getResponse(BuilderFactory.STRING);
    }

    public Response save() {
        client.save();
        return getResponse(BuilderFactory.STRING);
    }

    public Response lastsave() {
        client.lastsave();
        return getResponse(BuilderFactory.LONG);
    }

    public Response publish(String channel, String message) {
        client.publish(channel, message);
        return getResponse(BuilderFactory.LONG);
    }

    public Response publish(byte[] channel, byte[] message) {
        client.publish(channel, message);
        return getResponse(BuilderFactory.LONG);
    }

    public Response randomKey() {
        client.randomKey();
        return getResponse(BuilderFactory.STRING);
    }

    public Response randomKeyBinary() {
        client.randomKey();
        return getResponse(BuilderFactory.BYTE_ARRAY);
    }

    public Response flushDB() {
        client.flushDB();
        return getResponse(BuilderFactory.STRING);
    }

    public Response flushAll() {
        client.flushAll();
        return getResponse(BuilderFactory.STRING);
    }

    public Response info() {
        client.info();
        return getResponse(BuilderFactory.STRING);
    }

    public Response dbSize() {
        client.dbSize();
        return getResponse(BuilderFactory.LONG);
    }

    public Response shutdown() {
        client.shutdown();
        return getResponse(BuilderFactory.STRING);
    }

    public Response ping() {
        client.ping();
        return getResponse(BuilderFactory.STRING);
    }

    public Response select(int index) {
        client.select(index);
        return getResponse(BuilderFactory.STRING);
    }

    public Response bitop(BitOP op, byte[] destKey, byte[]... srcKeys) {
        client.bitop(op, destKey, srcKeys);
        return getResponse(BuilderFactory.LONG);
    }

    public Response bitop(BitOP op, String destKey, String... srcKeys) {
        client.bitop(op, destKey, srcKeys);
        return getResponse(BuilderFactory.LONG);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy