Extract string and binary common interfaces for Pipline and ShardedJedisPipeline. While I'm here add missing binary methods for some bit operations and fix return types for some sharded operations (e.g. getType)
This commit is contained in:
184
src/main/java/redis/clients/jedis/RedisPipeline.java
Normal file
184
src/main/java/redis/clients/jedis/RedisPipeline.java
Normal file
@@ -0,0 +1,184 @@
|
||||
package redis.clients.jedis;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author guy
|
||||
*/
|
||||
public interface RedisPipeline {
|
||||
Response<Long> append(String key, String value);
|
||||
|
||||
Response<Long> decr(String key);
|
||||
|
||||
Response<Long> decrBy(String key, long integer);
|
||||
|
||||
Response<Boolean> exists(String key);
|
||||
|
||||
Response<Long> expire(String key, int seconds);
|
||||
|
||||
Response<Long> expireAt(String key, long unixTime);
|
||||
|
||||
Response<String> get(String key);
|
||||
|
||||
Response<Boolean> getbit(String key, long offset);
|
||||
|
||||
|
||||
|
||||
Response<String> getrange(String key, long startOffset,
|
||||
long endOffset);
|
||||
|
||||
Response<String> getSet(String key, String value);
|
||||
|
||||
Response<Long> hdel(String key, String field);
|
||||
|
||||
Response<Boolean> hexists(String key, String field);
|
||||
|
||||
Response<String> hget(String key, String field);
|
||||
|
||||
Response<Map<String, String>> hgetAll(String key);
|
||||
|
||||
Response<Long> hincrBy(String key, String field, long value);
|
||||
|
||||
Response<Set<String>> hkeys(String key);
|
||||
|
||||
Response<Long> hlen(String key);
|
||||
|
||||
Response<List<String>> hmget(String key, String... fields);
|
||||
|
||||
Response<String> hmset(String key, Map<String, String> hash);
|
||||
|
||||
Response<Long> hset(String key, String field, String value);
|
||||
|
||||
Response<Long> hsetnx(String key, String field, String value);
|
||||
|
||||
Response<List<String>> hvals(String key);
|
||||
|
||||
Response<Long> incr(String key);
|
||||
|
||||
Response<Long> incrBy(String key, long integer);
|
||||
|
||||
Response<String> lindex(String key, int index);
|
||||
|
||||
Response<Long> linsert(String key, BinaryClient.LIST_POSITION where,
|
||||
String pivot, String value);
|
||||
|
||||
Response<Long> llen(String key);
|
||||
|
||||
Response<String> lpop(String key);
|
||||
|
||||
Response<Long> lpush(String key, String string);
|
||||
|
||||
Response<Long> lpushx(String key, String string);
|
||||
|
||||
Response<List<String>> lrange(String key, long start, long end);
|
||||
|
||||
Response<Long> lrem(String key, long count, String value);
|
||||
|
||||
Response<String> lset(String key, long index, String value);
|
||||
|
||||
Response<String> ltrim(String key, long start, long end);
|
||||
|
||||
Response<Long> persist(String key);
|
||||
|
||||
Response<String> rpop(String key);
|
||||
|
||||
Response<Long> rpush(String key, String string);
|
||||
|
||||
Response<Long> rpushx(String key, String string);
|
||||
|
||||
Response<Long> sadd(String key, String member);
|
||||
|
||||
Response<Long> scard(String key);
|
||||
|
||||
Response<Boolean> sismember(String key, String member);
|
||||
|
||||
Response<String> set(String key, String value);
|
||||
|
||||
Response<Boolean> setbit(String key, long offset, boolean value);
|
||||
|
||||
Response<String> setex(String key, int seconds, String value);
|
||||
|
||||
Response<Long> setnx(String key, String value);
|
||||
|
||||
Response<Set<String>> smembers(String key);
|
||||
|
||||
Response<Long> sort(String key);
|
||||
|
||||
Response<List<String>> sort(String key,
|
||||
SortingParams sortingParameters);
|
||||
|
||||
Response<String> spop(String key);
|
||||
|
||||
Response<String> srandmember(String key);
|
||||
|
||||
Response<Long> srem(String key, String member);
|
||||
|
||||
Response<Long> strlen(String key);
|
||||
|
||||
Response<String> substr(String key, int start, int end);
|
||||
|
||||
Response<Long> ttl(String key);
|
||||
|
||||
Response<String> type(String key);
|
||||
|
||||
Response<Long> zadd(String key, double score, String member);
|
||||
|
||||
Response<Long> zcard(String key);
|
||||
|
||||
Response<Long> zcount(String key, double min, double max);
|
||||
|
||||
Response<Double> zincrby(String key, double score, String member);
|
||||
|
||||
Response<Set<String>> zrange(String key, int start, int end);
|
||||
|
||||
Response<Set<String>> zrangeByScore(String key, double min,
|
||||
double max);
|
||||
|
||||
Response<Set<String>> zrangeByScore(String key, String min,
|
||||
String max);
|
||||
|
||||
Response<Set<String>> zrangeByScore(String key, double min,
|
||||
double max, int offset, int count);
|
||||
|
||||
Response<Set<Tuple>> zrangeByScoreWithScores(String key, double min,
|
||||
double max);
|
||||
|
||||
Response<Set<Tuple>> zrangeByScoreWithScores(String key, double min,
|
||||
double max, int offset, int count);
|
||||
|
||||
Response<Set<String>> zrevrangeByScore(String key, double max,
|
||||
double min);
|
||||
|
||||
Response<Set<String>> zrevrangeByScore(String key, String max,
|
||||
String min);
|
||||
|
||||
Response<Set<String>> zrevrangeByScore(String key, double max,
|
||||
double min, int offset, int count);
|
||||
|
||||
Response<Set<Tuple>> zrevrangeByScoreWithScores(String key,
|
||||
double max, double min);
|
||||
|
||||
Response<Set<Tuple>> zrevrangeByScoreWithScores(String key,
|
||||
double max, double min, int offset, int count);
|
||||
|
||||
Response<Set<Tuple>> zrangeWithScores(String key, int start, int end);
|
||||
|
||||
Response<Long> zrank(String key, String member);
|
||||
|
||||
Response<Long> zrem(String key, String member);
|
||||
|
||||
Response<Long> zremrangeByRank(String key, int start, int end);
|
||||
|
||||
Response<Long> zremrangeByScore(String key, double start, double end);
|
||||
|
||||
Response<Set<String>> zrevrange(String key, int start, int end);
|
||||
|
||||
Response<Set<Tuple>> zrevrangeWithScores(String key, int start,
|
||||
int end);
|
||||
|
||||
Response<Long> zrevrank(String key, String member);
|
||||
|
||||
Response<Double> zscore(String key, String member);
|
||||
}
|
||||
Reference in New Issue
Block a user