org.craft.atom.redis.api.ShardedRedisCommand Maven / Gradle / Ivy
package org.craft.atom.redis.api;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.craft.atom.redis.api.handler.RedisPsubscribeHandler;
import org.craft.atom.redis.api.handler.RedisSubscribeHandler;
/**
* All sharded redis commands.
*
* @author mindwind
* @version 1.0, Jun 26, 2013
*/
public interface ShardedRedisCommand {
// ~ --------------------------------------------------------------------------------------------------------- Keys
Long del(String shardkey, String... keys);
byte[] dump(String shardkey, String key);
Boolean exists(String shardkey, String key);
Long expire(String shardkey, String key, int seconds);
Long expireat(String shardkey, String key, long timestamp);
Set keys(String shardkey, String pattern);
String migrate(String shardkey, String host, int port, String key, int destinationdb, int timeout);
Long move(String shardkey, String key, int db);
Long objectrefcount(String shardkey, String key);
String objectencoding(String shardkey, String key);
Long objectidletime(String shardkey, String key);
Long persist(String shardkey, String key);
Long pexpire(String shardkey, String key, int milliseconds);
Long pexpireat(String shardkey, String key, long millisecondstimestamp);
Long pttl(String shardkey, String key);
String randomkey(String shardkey);
String rename(String shardkey, String key, String newkey);
Long renamenx(String shardkey, String key, String newkey);
String restore(String shardkey, String key, int ttl, byte[] serializedvalue);
List sort(String shardkey, String key);
List sort(String shardkey, String key, boolean desc);
List sort(String shardkey, String key, boolean alpha, boolean desc);
List sort(String shardkey, String key, int offset, int count);
List sort(String shardkey, String key, int offset, int count, boolean alpha, boolean desc);
List sort(String shardkey, String key, String bypattern, String... getpatterns);
List sort(String shardkey, String key, String bypattern, boolean desc, String... getpatterns);
List sort(String shardkey, String key, String bypattern, boolean alpha, boolean desc, String... getpatterns);
List sort(String shardkey, String key, String bypattern, int offset, int count, String... getpatterns);
List sort(String shardkey, String key, String bypattern, int offset, int count, boolean alpha, boolean desc, String... getpatterns);
Long sort(String shardkey, String key, String destination);
Long sort(String shardkey, String key, boolean desc, String destination);
Long sort(String shardkey, String key, boolean alpha, boolean desc, String destination);
Long sort(String shardkey, String key, int offset, int count, String destination);
Long sort(String shardkey, String key, int offset, int count, boolean alpha, boolean desc, String destination);
Long sort(String shardkey, String key, String bypattern, String destination, String... getpatterns);
Long sort(String shardkey, String key, String bypattern, boolean desc, String destination, String... getpatterns);
Long sort(String shardkey, String key, String bypattern, boolean alpha, boolean desc, String destination, String... getpatterns);
Long sort(String shardkey, String key, String bypattern, int offset, int count, String destination, String... getpatterns);
Long sort(String shardkey, String key, String bypattern, int offset, int count, boolean alpha, boolean desc, String destination, String... getpatterns);
Long ttl(String shardkey, String key);
String type(String shardkey, String key);
// ~ ------------------------------------------------------------------------------------------------------ Strings
Long append(String shardkey, String key, String value);
Long bitcount(String shardkey, String key);
Long bitcount(String shardkey, String key, long start, long end);
Long bitnot(String shardkey, String destkey, String key);
Long bitand(String shardkey, String destkey, String... keys);
Long bitor(String shardkey, String destkey, String... keys);
Long bitxor(String shardkey, String destkey, String... keys);
Long decr(String shardkey, String key);
Long decrby(String shardkey, String key, long decrement);
String get(String shardkey, String key);
Boolean getbit(String shardkey, String key, long offset);
String getrange(String shardkey, String key, long start, long end);
String getset(String shardkey, String key, String value);
Long incr(String shardkey, String key);
Long incrby(String shardkey, String key, long increment);
Double incrbyfloat(String shardkey, String key, double increment);
List mget(String shardkey, String... keys);
String mset(String shardkey, String... keysvalues);
Long msetnx(String shardkey, String... keysvalues);
String psetex(String shardkey, String key, int milliseconds, String value);
String set(String shardkey, String key, String value);
String setxx(String shardkey, String key, String value);
String setnxex(String shardkey, String key, String value, int seconds);
String setnxpx(String shardkey, String key, String value, int milliseconds);
String setxxex(String shardkey, String key, String value, int seconds);
String setxxpx(String shardkey, String key, String value, int milliseconds);
Boolean setbit(String shardkey, String key, long offset, boolean value);
String setex(String shardkey, String key, int seconds, String value);
Long setnx(String shardkey, String key, String value);
Long setrange(String shardkey, String key, long offset, String value);
Long strlen(String shardkey, String key);
// ~ ------------------------------------------------------------------------------------------------------- Hashes
Long hdel(String shardkey, String key, String... fields);
Boolean hexists(String shardkey, String key, String field);
String hget(String shardkey, String key, String field);
Map hgetall(String shardkey, String key);
Long hincrby(String shardkey, String key, String field, long increment);
Double hincrbyfloat(String shardkey, String key, String field, double increment);
Set hkeys(String shardkey, String key);
Long hlen(String shardkey, String key);
List hmget(String shardkey, String key, String... fields);
String hmset(String shardkey, String key, Map fieldvalues);
Long hset(String shardkey, String key, String field, String value);
Long hsetnx(String shardkey, String key, String field, String value);
List hvals(String shardkey, String key);
// ~ ------------------------------------------------------------------------------------------------------- Lists
String blpop(String shardkey, String key);
String blpop(String shardkey, String key, int timeout);
Map blpop(String shardkey, String... keys);
Map blpop(String shardkey, int timeout, String... keys);
String brpop(String shardkey, String key);
String brpop(String shardkey, String key, int timeout);
Map brpop(String shardkey, String... keys);
Map brpop(String shardkey, int timeout, String... keys);
String brpoplpush(String shardkey, String source, String destination, int timeout);
String lindex(String shardkey, String key, long index);
Long linsertbefore(String shardkey, String key, String pivot, String value);
Long linsertafter(String shardkey, String key, String pivot, String value);
Long llen(String shardkey, String key);
String lpop(String shardkey, String key);
Long lpush(String shardkey, String key, String... values);
Long lpushx(String shardkey, String key, String value);
List lrange(String shardkey, String key, long start, long stop);
Long lrem(String shardkey, String key, long count, String value);
String lset(String shardkey, String key, long index, String value);
String ltrim(String shardkey, String key, long start, long stop);
String rpop(String shardkey, String key);
String rpoplpush(String shardkey, String source, String destination);
Long rpush(String shardkey, String key, String... values);
Long rpushx(String shardkey, String key, String value);
// ~ -------------------------------------------------------------------------------------------------------- Sets
Long sadd(String shardkey, String key, String... members);
Long scard(String shardkey, String key);
Set sdiff(String shardkey, String... keys);
Long sdiffstore(String shardkey, String destination, String... keys);
Set sinter(String shardkey, String... keys);
Long sinterstore(String shardkey, String destination, String... keys);
Boolean sismember(String shardkey, String key, String member);
Set smembers(String shardkey, String key);
Long smove(String shardkey, String source, String destination, String member);
String spop(String shardkey, String key);
List srandmember(String shardkey, String key, int count);
String srandmember(String shardkey, String key);
Long srem(String shardkey, String key, String... members);
Set sunion(String shardkey, String... keys);
Long sunionstore(String shardkey, String destination, String... keys);
// ~ -------------------------------------------------------------------------------------------------- Sorted Sets
Long zadd(String shardkey, String key, double score, String member);
Long zcard(String shardkey, String key);
Long zcount(String shardkey, String key, double min, double max);
Long zcount(String shardkey, String key, String min, String max);
Double zincrby(String shardkey, String key, double score, String member);
Long zinterstore(String shardkey, String destination, String... keys);
Long zinterstoremax(String shardkey, String destination, String... keys);
Long zinterstoremin(String shardkey, String destination, String... keys);
Long zinterstore(String shardkey, String destination, Map weightkeys);
Long zinterstoremax(String shardkey, String destination, Map weightkeys);
Long zinterstoremin(String shardkey, String destination, Map weightkeys);
Set zrange(String shardkey, String key, long start, long stop);
Map zrangewithscores(String shardkey, String key, long start, long stop);
Set zrangebyscore(String shardkey, String key, double min, double max);
Set zrangebyscore(String shardkey, String key, String min, String max);
Set zrangebyscore(String shardkey, String key, double min, double max, int offset, int count);
Set zrangebyscore(String shardkey, String key, String min, String max, int offset, int count);
Map zrangebyscorewithscores(String shardkey, String key, double min, double max);
Map zrangebyscorewithscores(String shardkey, String key, String min, String max);
Map zrangebyscorewithscores(String shardkey, String key, double min, double max, int offset, int count);
Map zrangebyscorewithscores(String shardkey, String key, String min, String max, int offset, int count);
Long zrank(String shardkey, String key, String member);
Long zrem(String shardkey, String key, String... members);
Long zremrangebyrank(String shardkey, String key, long start, long stop);
Long zremrangebyscore(String shardkey, String key, double min, double max);
Long zremrangebyscore(String shardkey, String key, String min, String max);
Set zrevrange(String shardkey, String key, long start, long stop);
Map zrevrangewithscores(String shardkey, String key, long start, long stop);
Set zrevrangebyscore(String shardkey, String key, double max, double min);
Set zrevrangebyscore(String shardkey, String key, String max, String min);
Set zrevrangebyscore(String shardkey, String key, double max, double min, int offset, int count);
Set zrevrangebyscore(String shardkey, String key, String max, String min, int offset, int count);
Map zrevrangebyscorewithscores(String shardkey, String key, double max, double min);
Map zrevrangebyscorewithscores(String shardkey, String key, String max, String min);
Map zrevrangebyscorewithscores(String shardkey, String key, double max, double min, int offset, int count);
Map zrevrangebyscorewithscores(String shardkey, String key, String max, String min, int offset, int count);
Long zrevrank(String shardkey, String key, String member);
Double zscore(String shardkey, String key, String member);
Long zunionstore(String shardkey, String destination, String... keys);
Long zunionstoremax(String shardkey, String destination, String... keys);
Long zunionstoremin(String shardkey, String destination, String... keys);
Long zunionstore(String shardkey, String destination, Map weightkeys);
Long zunionstoremax(String shardkey, String destination, Map weightkeys);
Long zunionstoremin(String shardkey, String destination, Map weightkeys);
// ~ ------------------------------------------------------------------------------------------------------ Pub/Sub
RedisPubSub psubscribe(String shardkey, RedisPsubscribeHandler handler, String... patterns);
Long publish(String shardkey, String channel, String message);
void punsubscribe(String shardkey, RedisPubSub pubsub, String... patterns);
RedisPubSub subscribe(String shardkey, RedisSubscribeHandler handler, String... channels);
void unsubscribe(String shardkey, RedisPubSub pubsub, String... channels);
// ~ ------------------------------------------------------------------------------------------------- Transactions
String discard(String shardkey, RedisTransaction t);
List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy