From 3d019c885667829f5e4606e1de76c2aa4f57c804 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Thu, 28 Oct 2021 22:17:00 +0600 Subject: [PATCH] Refactor class and interface names --- src/main/java/redis/clients/jedis/Jedis.java | 8 +- .../jedis/{JedisX.java => UnifiedJedis.java} | 30 +- ...va => AccessControlLogBinaryCommands.java} | 2 +- ...nds.java => AccessControlLogCommands.java} | 2 +- .../jedis/commands/BasicRedisPipeline.java | 59 --- .../jedis/commands/BinaryRedisPipeline.java | 417 ----------------- .../jedis/commands/ClusterPipeline.java | 27 -- .../jedis/commands/ControlBinaryCommands.java | 2 +- .../jedis/commands/ControlCommands.java | 2 +- ...mands.java => GenericControlCommands.java} | 2 +- .../commands/GeoPipelineBinaryCommands.java | 1 - ...Commands.java => JedisBinaryCommands.java} | 2 +- ...JedisXCommands.java => JedisCommands.java} | 2 +- .../commands/MultiKeyBinaryRedisPipeline.java | 130 ------ .../commands/MultiKeyCommandsPipeline.java | 136 ------ .../commands/PipelineBinaryCommands.java | 13 +- .../jedis/commands/PipelineCommands.java | 11 +- .../clients/jedis/commands/RedisPipeline.java | 435 ------------------ .../redis/clients/jedis/tests/UdsTest.java | 4 +- .../tests/benchmark/GetSetBenchmark.java | 4 +- .../commands/AllKindOfValuesCommandsTest.java | 2 +- .../ClusterJedisCommandsTestBase.java | 6 +- .../tests/commands/ScriptingCommandsTest.java | 2 +- 23 files changed, 44 insertions(+), 1255 deletions(-) rename src/main/java/redis/clients/jedis/{JedisX.java => UnifiedJedis.java} (98%) rename src/main/java/redis/clients/jedis/commands/{ACLBinaryCommands.java => AccessControlLogBinaryCommands.java} (92%) rename src/main/java/redis/clients/jedis/commands/{ACLCommands.java => AccessControlLogCommands.java} (93%) delete mode 100644 src/main/java/redis/clients/jedis/commands/BasicRedisPipeline.java delete mode 100644 src/main/java/redis/clients/jedis/commands/BinaryRedisPipeline.java delete mode 100644 src/main/java/redis/clients/jedis/commands/ClusterPipeline.java rename src/main/java/redis/clients/jedis/commands/{MiscellaneousControlCommands.java => GenericControlCommands.java} (71%) rename src/main/java/redis/clients/jedis/commands/{JedisXBinaryCommands.java => JedisBinaryCommands.java} (75%) rename src/main/java/redis/clients/jedis/commands/{JedisXCommands.java => JedisCommands.java} (64%) delete mode 100644 src/main/java/redis/clients/jedis/commands/MultiKeyBinaryRedisPipeline.java delete mode 100644 src/main/java/redis/clients/jedis/commands/MultiKeyCommandsPipeline.java delete mode 100644 src/main/java/redis/clients/jedis/commands/RedisPipeline.java diff --git a/src/main/java/redis/clients/jedis/Jedis.java b/src/main/java/redis/clients/jedis/Jedis.java index a806ab20c7..3b6b732635 100644 --- a/src/main/java/redis/clients/jedis/Jedis.java +++ b/src/main/java/redis/clients/jedis/Jedis.java @@ -32,11 +32,9 @@ import redis.clients.jedis.util.JedisURIHelper; import redis.clients.jedis.util.Pool; -public class Jedis implements ServerCommands, DatabaseCommands, ModuleCommands, - ControlCommands, ControlBinaryCommands, MiscellaneousControlCommands, - JedisXCommands, JedisXBinaryCommands, - ClusterCommands, - Closeable { +public class Jedis implements ServerCommands, DatabaseCommands, JedisCommands, JedisBinaryCommands, + ControlCommands, ControlBinaryCommands, ClusterCommands, ModuleCommands, + GenericControlCommands, Closeable { protected final Connection connection; private final RedisCommandObjects commandObjects = new RedisCommandObjects(); diff --git a/src/main/java/redis/clients/jedis/JedisX.java b/src/main/java/redis/clients/jedis/UnifiedJedis.java similarity index 98% rename from src/main/java/redis/clients/jedis/JedisX.java rename to src/main/java/redis/clients/jedis/UnifiedJedis.java index ee2a9c6304..034d82cc7f 100644 --- a/src/main/java/redis/clients/jedis/JedisX.java +++ b/src/main/java/redis/clients/jedis/UnifiedJedis.java @@ -3,7 +3,6 @@ import java.time.Duration; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; @@ -16,65 +15,64 @@ import redis.clients.jedis.resps.*; import redis.clients.jedis.stream.*; import redis.clients.jedis.util.IOUtils; -import redis.clients.jedis.commands.JedisXCommands; -import redis.clients.jedis.commands.JedisXBinaryCommands; import redis.clients.jedis.commands.RedisModuleCommands; import redis.clients.jedis.json.Path; import redis.clients.jedis.search.IndexOptions; import redis.clients.jedis.search.Query; import redis.clients.jedis.search.Schema; import redis.clients.jedis.search.SearchResult; +import redis.clients.jedis.commands.JedisCommands; +import redis.clients.jedis.commands.JedisBinaryCommands; -public class JedisX implements JedisXCommands, JedisXBinaryCommands, - SampleKeyedCommands, SampleBinaryKeyedCommands, - RedisModuleCommands, +public class UnifiedJedis implements JedisCommands, JedisBinaryCommands, + SampleKeyedCommands, SampleBinaryKeyedCommands, RedisModuleCommands, AutoCloseable { protected final JedisCommandExecutor executor; private final RedisCommandObjects commandObjects; - public JedisX() { + public UnifiedJedis() { this(new HostAndPort(Protocol.DEFAULT_HOST, Protocol.DEFAULT_PORT)); } - public JedisX(HostAndPort hostAndPort) { + public UnifiedJedis(HostAndPort hostAndPort) { this(new Connection(hostAndPort)); } - public JedisX(HostAndPort hostAndPort, JedisClientConfig clientConfig) { + public UnifiedJedis(HostAndPort hostAndPort, JedisClientConfig clientConfig) { this(new Connection(hostAndPort, clientConfig)); } - public JedisX(JedisSocketFactory socketFactory) { + public UnifiedJedis(JedisSocketFactory socketFactory) { this(new Connection(socketFactory)); } - public JedisX(Connection connection) { + public UnifiedJedis(Connection connection) { this.executor = new JedisConnectionExecutor(connection); this.commandObjects = new RedisCommandObjects(); } - public JedisX(JedisConnectionProvider provider) { + public UnifiedJedis(JedisConnectionProvider provider) { this.executor = new SimpleJedisExecutor(provider); this.commandObjects = (provider instanceof JedisClusterConnectionProvider) ? new RedisClusterCommandObjects() : new RedisCommandObjects(); } - public JedisX(Set jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts) { + public UnifiedJedis(Set jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts) { this(new JedisClusterConnectionProvider(jedisClusterNodes, clientConfig), maxAttempts, Duration.ofMillis(maxAttempts * clientConfig.getSocketTimeoutMillis())); } - public JedisX(Set jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts, Duration maxTotalRetriesDuration) { + public UnifiedJedis(Set jedisClusterNodes, JedisClientConfig clientConfig, int maxAttempts, Duration maxTotalRetriesDuration) { this(new JedisClusterConnectionProvider(jedisClusterNodes, clientConfig), maxAttempts, maxTotalRetriesDuration); } - public JedisX(Set jedisClusterNodes, JedisClientConfig clientConfig, + public UnifiedJedis(Set jedisClusterNodes, JedisClientConfig clientConfig, GenericObjectPoolConfig poolConfig, int maxAttempts, Duration maxTotalRetriesDuration) { this(new JedisClusterConnectionProvider(jedisClusterNodes, clientConfig, poolConfig), maxAttempts, maxTotalRetriesDuration); } - public JedisX(JedisClusterConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) { + public UnifiedJedis(JedisClusterConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) { if (provider instanceof JedisClusterConnectionProvider) { this.executor = new RetryableClusterCommandExecutor(provider, maxAttempts, maxTotalRetriesDuration); this.commandObjects = new RedisClusterCommandObjects(); diff --git a/src/main/java/redis/clients/jedis/commands/ACLBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/AccessControlLogBinaryCommands.java similarity index 92% rename from src/main/java/redis/clients/jedis/commands/ACLBinaryCommands.java rename to src/main/java/redis/clients/jedis/commands/AccessControlLogBinaryCommands.java index c7b3f7dfe7..ee2ea7fe31 100644 --- a/src/main/java/redis/clients/jedis/commands/ACLBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/AccessControlLogBinaryCommands.java @@ -3,7 +3,7 @@ import java.util.List; import redis.clients.jedis.resps.AccessControlUser; -public interface ACLBinaryCommands { +public interface AccessControlLogBinaryCommands { byte[] aclWhoAmIBinary(); diff --git a/src/main/java/redis/clients/jedis/commands/ACLCommands.java b/src/main/java/redis/clients/jedis/commands/AccessControlLogCommands.java similarity index 93% rename from src/main/java/redis/clients/jedis/commands/ACLCommands.java rename to src/main/java/redis/clients/jedis/commands/AccessControlLogCommands.java index 1d0e43a9c5..9699a25a13 100644 --- a/src/main/java/redis/clients/jedis/commands/ACLCommands.java +++ b/src/main/java/redis/clients/jedis/commands/AccessControlLogCommands.java @@ -4,7 +4,7 @@ import redis.clients.jedis.resps.AccessControlLogEntry; import redis.clients.jedis.resps.AccessControlUser; -public interface ACLCommands { +public interface AccessControlLogCommands { String aclWhoAmI(); diff --git a/src/main/java/redis/clients/jedis/commands/BasicRedisPipeline.java b/src/main/java/redis/clients/jedis/commands/BasicRedisPipeline.java deleted file mode 100644 index 12a467e34b..0000000000 --- a/src/main/java/redis/clients/jedis/commands/BasicRedisPipeline.java +++ /dev/null @@ -1,59 +0,0 @@ -package redis.clients.jedis.commands; - -import redis.clients.jedis.Module; -import redis.clients.jedis.Response; -import redis.clients.jedis.args.FlushMode; - -import java.util.List; - -/** - * Pipelined responses for all of the low level, non key related commands - */ -//Legacy -public interface BasicRedisPipeline { - - Response bgrewriteaof(); - - Response bgsave(); - - Response> configGet(String pattern); - - Response configSet(String parameter, String value); - - Response configResetStat(); - - Response save(); - - Response lastsave(); - - Response flushDB(); - - Response flushDB(FlushMode flushMode); - - Response flushAll(); - - Response flushAll(FlushMode flushMode); - - Response info(); - - Response> time(); - - Response dbSize(); - - Response shutdown(); - - Response ping(); - - Response select(int index); - - Response swapDB(int index1, int index2); - - Response migrate(String host, int port, String key, int destinationDB, int timeout); - - Response moduleLoad(String path); - - Response> moduleList(); - - Response moduleUnload(String name); - -} diff --git a/src/main/java/redis/clients/jedis/commands/BinaryRedisPipeline.java b/src/main/java/redis/clients/jedis/commands/BinaryRedisPipeline.java deleted file mode 100644 index dc948e40c8..0000000000 --- a/src/main/java/redis/clients/jedis/commands/BinaryRedisPipeline.java +++ /dev/null @@ -1,417 +0,0 @@ -package redis.clients.jedis.commands; - -import redis.clients.jedis.*; -import redis.clients.jedis.params.*; -import redis.clients.jedis.resps.LCSMatchResult; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import redis.clients.jedis.args.BitPosParams; -import redis.clients.jedis.args.GeoUnit; -import redis.clients.jedis.args.ListPosition; -import redis.clients.jedis.resps.GeoRadiusResponse; -import redis.clients.jedis.resps.Tuple; - -public interface BinaryRedisPipeline { - - Response append(byte[] key, byte[] value); - - Response> blpop(byte[] arg); - - Response> brpop(byte[] arg); - - Response decr(byte[] key); - - Response decrBy(byte[] key, long decrement); - - Response del(byte[] keys); - - Response unlink(byte[] keys); - - Response echo(byte[] string); - - Response exists(byte[] key); - - Response expire(byte[] key, long seconds); - - Response pexpire(byte[] key, long milliseconds); - - Response expireAt(byte[] key, long unixTime); - - Response pexpireAt(byte[] key, long millisecondsTimestamp); - - Response get(byte[] key); - - Response getDel(byte[] key); - - Response getEx(byte[] key, GetExParams params); - - Response getbit(byte[] key, long offset); - - Response getSet(byte[] key, byte[] value); - - Response getrange(byte[] key, long startOffset, long endOffset); - - Response hdel(byte[] key, byte[]... field); - - Response hexists(byte[] key, byte[] field); - - Response hget(byte[] key, byte[] field); - - Response> hgetAll(byte[] key); - - Response hincrBy(byte[] key, byte[] field, long value); - - Response> hkeys(byte[] key); - - Response hlen(byte[] key); - - Response> hmget(byte[] key, byte[]... fields); - - Response hmset(byte[] key, Map hash); - - Response hset(byte[] key, byte[] field, byte[] value); - - Response hset(byte[] key, Map hash); - - Response hsetnx(byte[] key, byte[] field, byte[] value); - - Response> hvals(byte[] key); - - Response hrandfield(byte[] key); - - Response> hrandfield(byte[] key, long count); - - Response> hrandfieldWithValues(byte[] key, long count); - - Response incr(byte[] key); - - Response incrBy(byte[] key, long increment); - - Response lindex(byte[] key, long index); - - Response linsert(byte[] key, ListPosition where, byte[] pivot, byte[] value); - - Response llen(byte[] key); - - Response lpop(byte[] key); - - Response> lpop(byte[] key, int count); - - Response lpos(byte[] key, byte[] element); - - Response lpos(byte[] key, byte[] element, LPosParams params); - - Response> lpos(byte[] key, byte[] element, LPosParams params, long count); - - Response lpush(byte[] key, byte[]... string); - - Response lpushx(byte[] key, byte[]... bytes); - - Response> lrange(byte[] key, long start, long stop); - - Response lrem(byte[] key, long count, byte[] value); - - Response lset(byte[] key, long index, byte[] value); - - Response ltrim(byte[] key, long start, long stop); - - Response move(byte[] key, int dbIndex); - - Response persist(byte[] key); - - Response rpop(byte[] key); - - Response> rpop(byte[] key, int count); - - Response rpush(byte[] key, byte[]... string); - - Response rpushx(byte[] key, byte[]... string); - - Response sadd(byte[] key, byte[]... member); - - Response scard(byte[] key); - - Response set(byte[] key, byte[] value); - - Response setbit(byte[] key, long offset, byte[] value); - - Response setrange(byte[] key, long offset, byte[] value); - - Response setex(byte[] key, long seconds, byte[] value); - - Response setnx(byte[] key, byte[] value); - - Response setrange(String key, long offset, String value); - - Response> smembers(byte[] key); - - Response sismember(byte[] key, byte[] member); - - Response> smismember(byte[] key, byte[]... members); - - Response> sort(byte[] key); - - Response> sort(byte[] key, SortingParams sortingParameters); - - Response spop(byte[] key); - - Response> spop(byte[] key, long count); - - Response srandmember(byte[] key); - - Response srem(byte[] key, byte[]... member); - - Response strlen(byte[] key); - - Response substr(byte[] key, int start, int end); - - Response touch(byte[] keys); - - Response ttl(byte[] key); - - Response pttl(byte[] key); - - Response type(byte[] key); - - Response zadd(byte[] key, double score, byte[] member); - - Response zadd(byte[] key, double score, byte[] member, ZAddParams params); - - Response zadd(byte[] key, Map scoreMembers); - - Response zadd(byte[] key, Map scoreMembers, ZAddParams params); - - Response zaddIncr(byte[] key, double score, byte[] member, ZAddParams params); - - Response zcard(byte[] key); - - Response zcount(byte[] key, double min, double max); - - Response zcount(byte[] key, byte[] min, byte[] max); - - Response zincrby(byte[] key, double increment, byte[] member); - - Response zincrby(byte[] key, double increment, byte[] member, ZIncrByParams params); - - Response> zrange(byte[] key, long start, long stop); - - Response> zrangeByScore(byte[] key, double min, double max); - - Response> zrangeByScore(byte[] key, byte[] min, byte[] max); - - Response> zrangeByScore(byte[] key, double min, double max, int offset, int count); - - Response> zrangeByScore(byte[] key, byte[] min, byte[] max, int offset, int count); - - Response> zrangeByScoreWithScores(byte[] key, double min, double max); - - Response> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max); - - Response> zrangeByScoreWithScores(byte[] key, double min, double max, int offset, int count); - - Response> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max, int offset, int count); - - Response> zrevrangeByScore(byte[] key, double max, double min); - - Response> zrevrangeByScore(byte[] key, byte[] max, byte[] min); - - Response> zrevrangeByScore(byte[] key, double max, double min, int offset, int count); - - Response> zrevrangeByScore(byte[] key, byte[] max, byte[] min, int offset, int count); - - Response> zrevrangeByScoreWithScores(byte[] key, double max, double min); - - Response> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min); - - Response> zrevrangeByScoreWithScores(byte[] key, double max, double min, int offset, int count); - - Response> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min, int offset, int count); - - Response> zrangeWithScores(byte[] key, long start, long stop); - - Response zrank(byte[] key, byte[] member); - - Response zrem(byte[] key, byte[]... members); - - Response zremrangeByRank(byte[] key, long start, long stop); - - Response zremrangeByScore(byte[] key, double min, double max); - - Response zremrangeByScore(byte[] key, byte[] min, byte[] max); - - Response> zrevrange(byte[] key, long start, long stop); - - Response> zrevrangeWithScores(byte[] key, long start, long stop); - - Response zrandmember(byte[] key); - - Response> zrandmember(byte[] key, long count); - - Response> zrandmemberWithScores(byte[] key, long count); - - Response zrevrank(byte[] key, byte[] member); - - Response zscore(byte[] key, byte[] member); - - Response> zmscore(byte[] key, byte[]... members); - - Response zpopmax(byte[] key); - - Response> zpopmax(byte[] key, int count); - - Response zpopmin(byte[] key); - - Response> zpopmin(byte[] key, int count); - - Response zlexcount(byte[] key, byte[] min, byte[] max); - - Response> zrangeByLex(byte[] key, byte[] min, byte[] max); - - Response> zrangeByLex(byte[] key, byte[] min, byte[] max, int offset, int count); - - Response> zrevrangeByLex(byte[] key, byte[] max, byte[] min); - - Response> zrevrangeByLex(byte[] key, byte[] max, byte[] min, int offset, int count); - - Response zremrangeByLex(byte[] key, byte[] min, byte[] max); - - Response bitcount(byte[] key); - - Response bitcount(byte[] key, long start, long end); - - Response pfadd(byte[] key, byte[]... elements); - - Response pfcount(byte[] key); - - Response dump(byte[] key); - - Response restore(byte[] key, long ttl, byte[] serializedValue); - - Response restore(byte[] key, long ttl, byte[] serializedValue, RestoreParams params); - - Response migrate(String host, int port, byte[] key, int destinationDB, int timeout); - - // Geo Commands - Response geoadd(byte[] key, double longitude, double latitude, byte[] member); - - Response geoadd(byte[] key, Map memberCoordinateMap); - - Response geoadd(byte[] key, GeoAddParams params, Map memberCoordinateMap); - - Response geodist(byte[] key, byte[] member1, byte[] member2); - - Response geodist(byte[] key, byte[] member1, byte[] member2, GeoUnit unit); - - Response> geohash(byte[] key, byte[]... members); - - Response> geopos(byte[] key, byte[]... members); - - Response> georadius(byte[] key, double longitude, double latitude, - double radius, GeoUnit unit); - - Response> georadiusReadonly(byte[] key, double longitude, double latitude, - double radius, GeoUnit unit); - - Response> georadius(byte[] key, double longitude, double latitude, - double radius, GeoUnit unit, GeoRadiusParam param); - - Response> georadiusReadonly(byte[] key, double longitude, double latitude, - double radius, GeoUnit unit, GeoRadiusParam param); - - Response> georadiusByMember(byte[] key, byte[] member, double radius, - GeoUnit unit); - - Response> georadiusByMemberReadonly(byte[] key, byte[] member, - double radius, GeoUnit unit); - - Response> georadiusByMember(byte[] key, byte[] member, double radius, - GeoUnit unit, GeoRadiusParam param); - - Response> georadiusByMemberReadonly(byte[] key, byte[] member, - double radius, GeoUnit unit, GeoRadiusParam param); - - Response> bitfield(byte[] key, byte[]... elements); - - Response> bitfieldReadonly(byte[] key, byte[]... elements); - - Response hstrlen(byte[] key, byte[] field); - - Response xadd(byte[] key, byte[] id, Map hash); - - Response xadd(byte[] key, byte[] id, Map hash, long maxLen, boolean approximateLength); - - Response xadd(byte[] key, Map hash, XAddParams params); - - Response xlen(byte[] key); - - Response> xrange(byte[] key, byte[] start, byte[] end); - - Response> xrange(byte[] key, byte[] start, byte[] end, int count); - - Response> xrevrange(byte[] key, byte[] end, byte[] start); - - Response> xrevrange(byte[] key, byte[] end, byte[] start, int count); - - Response xack(byte[] key, byte[] group, byte[]... ids); - - Response xgroupCreate(byte[] key, byte[] groupname, byte[] id, boolean makeStream); - - Response xgroupSetID(byte[] key, byte[] groupname, byte[] id); - - Response xgroupDestroy(byte[] key, byte[] groupname); - - Response xgroupDelConsumer(byte[] key, byte[] groupname, byte[] consumername); - - Response xpending(byte[] key, byte[] groupname); - - Response> xpendingBinary(byte[] key, byte[] groupname, byte[] start, byte[] end, int count, byte[] consumername); - - Response> xpending(byte[] key, byte[] groupname, XPendingParams params); - - Response xdel(byte[] key, byte[]... ids); - - Response xtrim(byte[] key, long maxLen, boolean approximateLength); - - Response xtrim(byte[] key, XTrimParams params); - - Response> xclaim(byte[] key, byte[] group, byte[] consumername, long minIdleTime, - long newIdleTime, int retries, boolean force, byte[]... ids); - - Response> xclaim(byte[] key, byte[] group, byte[] consumername, long minIdleTime, - XClaimParams params, byte[]... ids); - - Response> xclaimJustId(byte[] key, byte[] group, byte[] consumername, - long minIdleTime, XClaimParams params, byte[]... ids); - - Response> xautoclaim(byte[] key, byte[] group, byte[] consumerName, - long minIdleTime, byte[] start, XAutoClaimParams params); - - Response> xautoclaimJustId(byte[] key, byte[] group, byte[] consumerName, - long minIdleTime, byte[] start, XAutoClaimParams params); - - Response bitpos(byte[] key, boolean value); - - Response bitpos(byte[] key, boolean value, BitPosParams params); - - Response set(byte[] key, byte[] value, SetParams params); - - Response> srandmember(byte[] key, int count); - - Response objectRefcount(byte[] key); - - Response objectEncoding(byte[] key); - - Response objectIdletime(byte[] key); - - Response objectFreq(byte[] key); - - Response incrByFloat(byte[] key, double increment); - - Response psetex(byte[] key, long milliseconds, byte[] value); - - Response hincrByFloat(byte[] key, byte[] field, double increment); - - Response strAlgoLCSStrings(final byte[] strA, final byte[] strB, final StrAlgoLCSParams params); -} diff --git a/src/main/java/redis/clients/jedis/commands/ClusterPipeline.java b/src/main/java/redis/clients/jedis/commands/ClusterPipeline.java deleted file mode 100644 index 2b07e9f3c2..0000000000 --- a/src/main/java/redis/clients/jedis/commands/ClusterPipeline.java +++ /dev/null @@ -1,27 +0,0 @@ -package redis.clients.jedis.commands; - -import redis.clients.jedis.Response; - -import java.util.List; - -//Legacy -public interface ClusterPipeline { - - Response clusterNodes(); - - Response clusterMeet(String ip, int port); - - Response clusterAddSlots(int... slots); - - Response clusterDelSlots(int... slots); - - Response clusterInfo(); - - Response> clusterGetKeysInSlot(int slot, int count); - - Response clusterSetSlotNode(int slot, String nodeId); - - Response clusterSetSlotMigrating(int slot, String nodeId); - - Response clusterSetSlotImporting(int slot, String nodeId); -} diff --git a/src/main/java/redis/clients/jedis/commands/ControlBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/ControlBinaryCommands.java index 606b31ef90..a5389139d2 100644 --- a/src/main/java/redis/clients/jedis/commands/ControlBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/ControlBinaryCommands.java @@ -2,7 +2,7 @@ import java.util.List; -public interface ControlBinaryCommands extends ACLBinaryCommands, ClientBinaryCommands { +public interface ControlBinaryCommands extends AccessControlLogBinaryCommands, ClientBinaryCommands { List roleBinary(); diff --git a/src/main/java/redis/clients/jedis/commands/ControlCommands.java b/src/main/java/redis/clients/jedis/commands/ControlCommands.java index 8aa679dec2..3e64f6b5fe 100644 --- a/src/main/java/redis/clients/jedis/commands/ControlCommands.java +++ b/src/main/java/redis/clients/jedis/commands/ControlCommands.java @@ -2,7 +2,7 @@ import java.util.List; -public interface ControlCommands extends ACLCommands, ClientCommands { +public interface ControlCommands extends AccessControlLogCommands, ClientCommands { List role(); diff --git a/src/main/java/redis/clients/jedis/commands/MiscellaneousControlCommands.java b/src/main/java/redis/clients/jedis/commands/GenericControlCommands.java similarity index 71% rename from src/main/java/redis/clients/jedis/commands/MiscellaneousControlCommands.java rename to src/main/java/redis/clients/jedis/commands/GenericControlCommands.java index a85bb299bc..042f2c8e8f 100644 --- a/src/main/java/redis/clients/jedis/commands/MiscellaneousControlCommands.java +++ b/src/main/java/redis/clients/jedis/commands/GenericControlCommands.java @@ -4,7 +4,7 @@ import redis.clients.jedis.Module; import redis.clients.jedis.params.FailoverParams; -public interface MiscellaneousControlCommands extends ConfigCommands, ScriptingControlCommands, SlowlogCommands { +public interface GenericControlCommands extends ConfigCommands, ScriptingControlCommands, SlowlogCommands { String failover(); diff --git a/src/main/java/redis/clients/jedis/commands/GeoPipelineBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/GeoPipelineBinaryCommands.java index 5b9458ead7..5c10a368b0 100644 --- a/src/main/java/redis/clients/jedis/commands/GeoPipelineBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/GeoPipelineBinaryCommands.java @@ -8,7 +8,6 @@ import redis.clients.jedis.params.GeoRadiusStoreParam; import redis.clients.jedis.resps.GeoRadiusResponse; -import javax.print.DocFlavor; import java.util.List; import java.util.Map; diff --git a/src/main/java/redis/clients/jedis/commands/JedisXBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/JedisBinaryCommands.java similarity index 75% rename from src/main/java/redis/clients/jedis/commands/JedisXBinaryCommands.java rename to src/main/java/redis/clients/jedis/commands/JedisBinaryCommands.java index 25df656795..5c31157243 100644 --- a/src/main/java/redis/clients/jedis/commands/JedisXBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/JedisBinaryCommands.java @@ -1,6 +1,6 @@ package redis.clients.jedis.commands; -public interface JedisXBinaryCommands extends KeyBinaryCommands, StringBinaryCommands, +public interface JedisBinaryCommands extends KeyBinaryCommands, StringBinaryCommands, ListBinaryCommands, HashBinaryCommands, SetBinaryCommands, SortedSetBinaryCommands, GeoBinaryCommands, HyperLogLogBinaryCommands, StreamBinaryCommands, ScriptingKeyBinaryCommands, MiscellaneousBinaryCommands { diff --git a/src/main/java/redis/clients/jedis/commands/JedisXCommands.java b/src/main/java/redis/clients/jedis/commands/JedisCommands.java similarity index 64% rename from src/main/java/redis/clients/jedis/commands/JedisXCommands.java rename to src/main/java/redis/clients/jedis/commands/JedisCommands.java index acba24e031..61272c6bff 100644 --- a/src/main/java/redis/clients/jedis/commands/JedisXCommands.java +++ b/src/main/java/redis/clients/jedis/commands/JedisCommands.java @@ -1,6 +1,6 @@ package redis.clients.jedis.commands; -public interface JedisXCommands extends KeyCommands, StringCommands, ListCommands, HashCommands, +public interface JedisCommands extends KeyCommands, StringCommands, ListCommands, HashCommands, SetCommands, SortedSetCommands, GeoCommands, HyperLogLogCommands, StreamCommands, ScriptingKeyCommands, MiscellaneousCommands { } diff --git a/src/main/java/redis/clients/jedis/commands/MultiKeyBinaryRedisPipeline.java b/src/main/java/redis/clients/jedis/commands/MultiKeyBinaryRedisPipeline.java deleted file mode 100644 index 44476ced3e..0000000000 --- a/src/main/java/redis/clients/jedis/commands/MultiKeyBinaryRedisPipeline.java +++ /dev/null @@ -1,130 +0,0 @@ -package redis.clients.jedis.commands; - -import redis.clients.jedis.Response; -import redis.clients.jedis.resps.LCSMatchResult; -import redis.clients.jedis.args.*; -import redis.clients.jedis.params.*; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import redis.clients.jedis.resps.Tuple; - -/** - * Multikey related commands (these are split out because they are non-shardable) - */ -//Legacy -public interface MultiKeyBinaryRedisPipeline { - - Response copy(byte[] srcKey, byte[] dstKey, int db, boolean replace); - - Response copy(byte[] srcKey, byte[] dstKey, boolean replace); - - Response del(byte[]... keys); - - Response unlink(byte[]... keys); - - Response exists(byte[]... keys); - - Response lmove(byte[] srcKey, byte[] dstKey, ListDirection from, ListDirection to); - - Response blmove(byte[] srcKey, byte[] dstKey, ListDirection from, ListDirection to, double timeout); - - Response> blpop(byte[]... args); - - Response> blpop(double timeout, byte[]... args); - - Response> brpop(byte[]... args); - - Response> brpop(double timeout, byte[]... args); - - Response> bzpopmax(double timeout, byte[]... keys); - - Response> bzpopmin(double timeout, byte[]... keys); - - Response> keys(byte[] pattern); - - Response> mget(byte[]... keys); - - Response mset(byte[]... keysvalues); - - Response msetnx(byte[]... keysvalues); - - Response rename(byte[] oldkey, byte[] newkey); - - Response renamenx(byte[] oldkey, byte[] newkey); - - Response rpoplpush(byte[] srckey, byte[] dstkey); - - Response> sdiff(byte[]... keys); - - Response sdiffstore(byte[] dstkey, byte[]... keys); - - Response> sinter(byte[]... keys); - - Response sinterstore(byte[] dstkey, byte[]... keys); - - Response smove(byte[] srckey, byte[] dstkey, byte[] member); - - Response sort(byte[] key, SortingParams sortingParameters, byte[] dstkey); - - Response sort(byte[] key, byte[] dstkey); - - Response> sunion(byte[]... keys); - - Response sunionstore(byte[] dstkey, byte[]... keys); - - Response unwatch(); - - Response> zdiff(byte[]... keys); - - Response> zdiffWithScores(byte[]... keys); - - Response zdiffStore(byte[] dstkey, byte[]... keys); - - Response> zinter(ZParams params, byte[]... keys); - - Response> zinterWithScores(ZParams params, byte[]... keys); - - Response zinterstore(byte[] dstkey, byte[]... sets); - - Response zinterstore(byte[] dstkey, ZParams params, byte[]... sets); - - Response> zunion(ZParams params, byte[]... keys); - - Response> zunionWithScores(ZParams params, byte[]... keys); - - Response zunionstore(byte[] dstkey, byte[]... sets); - - Response zunionstore(byte[] dstkey, ZParams params, byte[]... sets); - - Response brpoplpush(byte[] source, byte[] destination, int timeout); - - Response publish(byte[] channel, byte[] message); - - Response randomKeyBinary(); - - Response bitop(BitOP op, byte[] destKey, byte[]... srcKeys); - - Response pfmerge(byte[] destkey, byte[]... sourcekeys); - - Response pfcount(byte[]... keys); - - Response touch(byte[]... keys); - - Response migrate(String host, int port, int destinationDB, int timeout, - MigrateParams params, byte[]... keys); - - Response georadiusStore(byte[] key, double longitude, double latitude, double radius, - GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam); - - Response georadiusByMemberStore(byte[] key, byte[] member, double radius, GeoUnit unit, - GeoRadiusParam param, GeoRadiusStoreParam storeParam); - - Response> xread(XReadParams xReadParams, Map.Entry... streams); - - Response> xreadGroup(byte[] groupname, byte[] consumer, - XReadGroupParams xReadGroupParams, Map.Entry... streams); - - Response strAlgoLCSKeys(final byte[] keyA, final byte[] keyB, final StrAlgoLCSParams params); -} diff --git a/src/main/java/redis/clients/jedis/commands/MultiKeyCommandsPipeline.java b/src/main/java/redis/clients/jedis/commands/MultiKeyCommandsPipeline.java deleted file mode 100644 index 15e3427724..0000000000 --- a/src/main/java/redis/clients/jedis/commands/MultiKeyCommandsPipeline.java +++ /dev/null @@ -1,136 +0,0 @@ -package redis.clients.jedis.commands; - -import redis.clients.jedis.Response; -import redis.clients.jedis.args.*; -import redis.clients.jedis.params.*; -import redis.clients.jedis.resps.*; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import redis.clients.jedis.stream.StreamEntry; -import redis.clients.jedis.stream.StreamEntryID; - -/** - * Multikey related commands (these are split out because they are non-shardable) - */ -//Legacy -public interface MultiKeyCommandsPipeline { - Response copy(String srcKey, String dstKey, int db, boolean replace); - - Response copy(String srcKey, String dstKey, boolean replace); - - Response del(String... keys); - - Response unlink(String... keys); - - Response exists(String... keys); - - Response lmove(String srcKey, String dstKey, ListDirection from, ListDirection to); - - Response blmove(String srcKey, String dstKey, ListDirection from, ListDirection to, - double timeout); - - Response> blpop(String... args); - - Response> blpop(int timeout, String... args); - - Response blpop(double timeout, String... args); - - Response> brpop(String... args); - - Response> brpop(int timeout, String... args); - - Response brpop(double timeout, String... args); - - Response bzpopmax(double timeout, String... keys); - - Response bzpopmin(double timeout, String... keys); - - Response> keys(String pattern); - - Response> mget(String... keys); - - Response mset(String... keysvalues); - - Response msetnx(String... keysvalues); - - Response rename(String oldkey, String newkey); - - Response renamenx(String oldkey, String newkey); - - Response rpoplpush(String srckey, String dstkey); - - Response> sdiff(String... keys); - - Response sdiffstore(String dstkey, String... keys); - - Response> sinter(String... keys); - - Response sinterstore(String dstkey, String... keys); - - Response smove(String srckey, String dstkey, String member); - - Response sort(String key, SortingParams sortingParameters, String dstkey); - - Response sort(String key, String dstkey); - - Response> sunion(String... keys); - - Response sunionstore(String dstkey, String... keys); - - Response unwatch(); - - Response> zdiff(String... keys); - - Response> zdiffWithScores(String... keys); - - Response zdiffStore(String dstkey, String... keys); - - Response> zinter(ZParams params, String... keys); - - Response> zinterWithScores(ZParams params, String... keys); - - Response zinterstore(String dstkey, String... sets); - - Response zinterstore(String dstkey, ZParams params, String... sets); - - Response> zunion(ZParams params, String... keys); - - Response> zunionWithScores(ZParams params, String... keys); - - Response zunionstore(String dstkey, String... sets); - - Response zunionstore(String dstkey, ZParams params, String... sets); - - Response brpoplpush(String source, String destination, int timeout); - - Response publish(String channel, String message); - - Response randomKey(); - - Response bitop(BitOP op, String destKey, String... srcKeys); - - Response pfmerge(String destkey, String... sourcekeys); - - Response pfcount(String... keys); - - Response touch(String... keys); - - Response migrate(String host, int port, int destinationDB, int timeout, - MigrateParams params, String... keys); - - Response georadiusStore(String key, double longitude, double latitude, double radius, - GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam); - - Response georadiusByMemberStore(String key, String member, double radius, GeoUnit unit, - GeoRadiusParam param, GeoRadiusStoreParam storeParam); - - Response>>> xread(XReadParams xReadParams, - Map streams); - - Response>>> xreadGroup(String groupname, String consumer, - XReadGroupParams xReadGroupParams, Map streams); - - Response strAlgoLCSKeys(final String keyA, final String keyB, final StrAlgoLCSParams params); -} diff --git a/src/main/java/redis/clients/jedis/commands/PipelineBinaryCommands.java b/src/main/java/redis/clients/jedis/commands/PipelineBinaryCommands.java index 70a461cade..22fe43e498 100644 --- a/src/main/java/redis/clients/jedis/commands/PipelineBinaryCommands.java +++ b/src/main/java/redis/clients/jedis/commands/PipelineBinaryCommands.java @@ -1,10 +1,9 @@ package redis.clients.jedis.commands; public interface PipelineBinaryCommands extends KeyPipelineBinaryCommands, - StringPipelineBinaryCommands, ListPipelineBinaryCommands, - HashPipelineBinaryCommands, SetPipelineBinaryCommands, - SortedSetPipelineBinaryCommands, GeoPipelineBinaryCommands, - HyperLogLogPipelineBinaryCommands, StreamPipelineBinaryCommands, - ScriptingKeyPipelineBinaryCommands, SampleBinaryKeyedPipelineCommands, - MiscellaneousPipelineBinaryCommands { - } + StringPipelineBinaryCommands, ListPipelineBinaryCommands, HashPipelineBinaryCommands, + SetPipelineBinaryCommands, SortedSetPipelineBinaryCommands, GeoPipelineBinaryCommands, + HyperLogLogPipelineBinaryCommands, StreamPipelineBinaryCommands, + ScriptingKeyPipelineBinaryCommands, SampleBinaryKeyedPipelineCommands, + MiscellaneousPipelineBinaryCommands { +} diff --git a/src/main/java/redis/clients/jedis/commands/PipelineCommands.java b/src/main/java/redis/clients/jedis/commands/PipelineCommands.java index 3b838507d2..149790af7d 100644 --- a/src/main/java/redis/clients/jedis/commands/PipelineCommands.java +++ b/src/main/java/redis/clients/jedis/commands/PipelineCommands.java @@ -1,8 +1,7 @@ package redis.clients.jedis.commands; -public interface PipelineCommands extends KeyPipelineCommands, StringPipelineCommands, ListPipelineCommands, - HashPipelineCommands, SetPipelineCommands, SortedSetPipelineCommands, GeoPipelineCommands, - HyperLogLogPipelineCommands, StreamPipelineCommands, ScriptingKeyPipelineCommands, SampleKeyedPipelineCommands, - MiscellaneousPipelineCommands { - - } +public interface PipelineCommands extends KeyPipelineCommands, StringPipelineCommands, + ListPipelineCommands, HashPipelineCommands, SetPipelineCommands, SortedSetPipelineCommands, + GeoPipelineCommands, HyperLogLogPipelineCommands, StreamPipelineCommands, + ScriptingKeyPipelineCommands, SampleKeyedPipelineCommands, MiscellaneousPipelineCommands { +} diff --git a/src/main/java/redis/clients/jedis/commands/RedisPipeline.java b/src/main/java/redis/clients/jedis/commands/RedisPipeline.java deleted file mode 100644 index 59fa20bd35..0000000000 --- a/src/main/java/redis/clients/jedis/commands/RedisPipeline.java +++ /dev/null @@ -1,435 +0,0 @@ -package redis.clients.jedis.commands; - -import redis.clients.jedis.GeoCoordinate; -import redis.clients.jedis.Response; -import redis.clients.jedis.params.GeoAddParams; -import redis.clients.jedis.params.GeoRadiusParam; -import redis.clients.jedis.params.GetExParams; -import redis.clients.jedis.params.RestoreParams; -import redis.clients.jedis.params.SetParams; -import redis.clients.jedis.params.StrAlgoLCSParams; -import redis.clients.jedis.params.XAddParams; -import redis.clients.jedis.params.XAutoClaimParams; -import redis.clients.jedis.params.XClaimParams; -import redis.clients.jedis.params.XPendingParams; -import redis.clients.jedis.params.XTrimParams; -import redis.clients.jedis.params.ZAddParams; -import redis.clients.jedis.params.ZIncrByParams; -import redis.clients.jedis.params.LPosParams; -import redis.clients.jedis.resps.LCSMatchResult; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import redis.clients.jedis.args.BitPosParams; -import redis.clients.jedis.args.GeoUnit; -import redis.clients.jedis.args.ListPosition; -import redis.clients.jedis.params.SortingParams; -import redis.clients.jedis.resps.GeoRadiusResponse; -import redis.clients.jedis.resps.Tuple; -import redis.clients.jedis.stream.StreamEntry; -import redis.clients.jedis.stream.StreamEntryID; -import redis.clients.jedis.stream.StreamPendingEntry; -import redis.clients.jedis.stream.StreamPendingSummary; - -public interface RedisPipeline { - - Response append(String key, String value); - - Response> blpop(String arg); - - Response> brpop(String arg); - - Response decr(String key); - - Response decrBy(String key, long decrement); - - Response del(String key); - - Response unlink(String key); - - Response echo(String string); - - Response exists(String key); - - Response expire(String key, long seconds); - - Response pexpire(String key, long milliseconds); - - Response expireAt(String key, long unixTime); - - Response pexpireAt(String key, long millisecondsTimestamp); - - Response get(String key); - - Response getDel(String key); - - Response getEx(String key, GetExParams params); - - Response getbit(String key, long offset); - - Response getrange(String key, long startOffset, long endOffset); - - Response getSet(String key, String value); - - Response hdel(String key, String... field); - - Response hexists(String key, String field); - - Response hget(String key, String field); - - Response> hgetAll(String key); - - Response hincrBy(String key, String field, long value); - - Response> hkeys(String key); - - Response hlen(String key); - - Response> hmget(String key, String... fields); - - Response hmset(String key, Map hash); - - Response hset(String key, String field, String value); - - Response hset(String key, Map hash); - - Response hsetnx(String key, String field, String value); - - Response> hvals(String key); - - Response hrandfield(String key); - - Response> hrandfield(String key, long count); - - Response> hrandfieldWithValues(String key, long count); - - Response incr(String key); - - Response incrBy(String key, long increment); - - Response lindex(String key, long index); - - Response linsert(String key, ListPosition where, String pivot, String value); - - Response llen(String key); - - Response lpop(String key); - - Response> lpop(String key, int count); - - Response lpos(String key, String element); - - Response lpos(String key, String element, LPosParams params); - - Response> lpos(String key, String element, LPosParams params, long count); - - Response lpush(String key, String... string); - - Response lpushx(String key, String... string); - - Response> lrange(String key, long start, long stop); - - Response lrem(String key, long count, String value); - - Response lset(String key, long index, String value); - - Response ltrim(String key, long start, long stop); - - Response move(String key, int dbIndex); - - Response persist(String key); - - Response rpop(String key); - - Response> rpop(String key, int count); - - Response rpush(String key, String... string); - - Response rpushx(String key, String... string); - - Response sadd(String key, String... member); - - Response scard(String key); - - Response sismember(String key, String member); - - Response> smismember(String key, String... members); - - Response set(String key, String value); - - Response setbit(String key, long offset, boolean value); - - Response setex(String key, long seconds, String value); - - Response setnx(String key, String value); - - Response setrange(String key, long offset, String value); - - Response> smembers(String key); - - Response> sort(String key); - - Response> sort(String key, SortingParams sortingParameters); - - Response spop(String key); - - Response> spop(String key, long count); - - Response srandmember(String key); - - Response srem(String key, String... member); - - Response strlen(String key); - - Response substr(String key, int start, int end); - - Response touch(String key); - - Response ttl(String key); - - Response pttl(String key); - - Response type(String key); - - Response zadd(String key, double score, String member); - - Response zadd(String key, double score, String member, ZAddParams params); - - Response zadd(String key, Map scoreMembers); - - Response zadd(String key, Map scoreMembers, ZAddParams params); - - Response zaddIncr(String key, double score, String member, ZAddParams params); - - Response zcard(String key); - - Response zcount(String key, double min, double max); - - Response zcount(String key, String min, String max); - - Response zincrby(String key, double increment, String member); - - Response zincrby(String key, double increment, String member, ZIncrByParams params); - - Response> zrange(String key, long start, long stop); - - Response> zrangeByScore(String key, double min, double max); - - Response> zrangeByScore(String key, String min, String max); - - Response> zrangeByScore(String key, double min, double max, int offset, int count); - - Response> zrangeByScore(String key, String min, String max, int offset, int count); - - Response> zrangeByScoreWithScores(String key, double min, double max); - - Response> zrangeByScoreWithScores(String key, double min, double max, int offset, int count); - - Response> zrevrangeByScore(String key, double max, double min); - - Response> zrevrangeByScore(String key, String max, String min); - - Response> zrevrangeByScore(String key, double max, double min, int offset, int count); - - Response> zrevrangeByScore(String key, String max, String min, int offset, int count); - - Response> zrevrangeByScoreWithScores(String key, double max, double min); - - Response> zrevrangeByScoreWithScores(String key, String max, String min); - - Response> zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count); - - Response> zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count); - - Response> zrangeWithScores(String key, long start, long stop); - - Response zrandmember(String key); - - Response> zrandmember(String key, long count); - - Response> zrandmemberWithScores(String key, long count); - - Response zrank(String key, String member); - - Response zrem(String key, String... members); - - Response zremrangeByRank(String key, long start, long stop); - - Response zremrangeByScore(String key, double min, double max); - - Response zremrangeByScore(String key, String min, String max); - - Response> zrevrange(String key, long start, long stop); - - Response> zrevrangeWithScores(String key, long start, long stop); - - Response zrevrank(String key, String member); - - Response zscore(String key, String member); - - Response> zmscore(String key, String... members); - - Response zpopmax(String key); - - Response> zpopmax(String key, int count); - - Response zpopmin(String key); - - Response> zpopmin(String key, int count); - - Response zlexcount(String key, String min, String max); - - Response> zrangeByLex(String key, String min, String max); - - Response> zrangeByLex(String key, String min, String max, int offset, int count); - - Response> zrevrangeByLex(String key, String max, String min); - - Response> zrevrangeByLex(String key, String max, String min, int offset, int count); - - Response zremrangeByLex(String key, String min, String max); - - Response bitcount(String key); - - Response bitcount(String key, long start, long end); - - Response pfadd(String key, String... elements); - - Response pfcount(String key); - - Response> bitfield(String key, String... arguments); - - Response> bitfieldReadonly(String key, String... arguments); - - Response hstrlen(String key, String field); - - Response dump(String key); - - Response restore(String key, long ttl, byte[] serializedValue); - - Response restore(String key, long ttl, byte[] serializedValue, RestoreParams params); - - Response migrate(String host, int port, String key, int destinationDB, int timeout); - - // Geo Commands - Response geoadd(String key, double longitude, double latitude, String member); - - Response geoadd(String key, Map memberCoordinateMap); - - Response geoadd(String key, GeoAddParams params, Map memberCoordinateMap); - - Response geodist(String key, String member1, String member2); - - Response geodist(String key, String member1, String member2, GeoUnit unit); - - Response> geohash(String key, String... members); - - Response> geopos(String key, String... members); - - Response> georadius(String key, double longitude, double latitude, - double radius, GeoUnit unit); - - Response> georadiusReadonly(String key, double longitude, double latitude, - double radius, GeoUnit unit); - - Response> georadius(String key, double longitude, double latitude, - double radius, GeoUnit unit, GeoRadiusParam param); - - Response> georadiusReadonly(String key, double longitude, double latitude, - double radius, GeoUnit unit, GeoRadiusParam param); - - Response> georadiusByMember(String key, String member, double radius, - GeoUnit unit); - - Response> georadiusByMemberReadonly(String key, String member, - double radius, GeoUnit unit); - - Response> georadiusByMember(String key, String member, double radius, - GeoUnit unit, GeoRadiusParam param); - - Response> georadiusByMemberReadonly(String key, String member, - double radius, GeoUnit unit, GeoRadiusParam param); - - Response xadd(String key, StreamEntryID id, Map hash); - - Response xadd(String key, StreamEntryID id, Map hash, long maxLen, boolean approximateLength); - - Response xadd(String key, Map hash, XAddParams params); - - Response xlen(String key); - - Response> xrange(String key, StreamEntryID start, StreamEntryID end); - - Response> xrange(String key, StreamEntryID start, StreamEntryID end, int count); - - Response> xrevrange(String key, StreamEntryID end, StreamEntryID start); - - Response> xrevrange(String key, StreamEntryID end, StreamEntryID start, int count); - - Response xack(String key, String group, StreamEntryID... ids); - - Response xgroupCreate(String key, String groupname, StreamEntryID id, boolean makeStream); - - Response xgroupSetID(String key, String groupname, StreamEntryID id); - - Response xgroupDestroy(String key, String groupname); - - Response xgroupDelConsumer(String key, String groupname, String consumername); - - Response xpending(String key, String groupname); - - Response> xpending(String key, String groupname, - StreamEntryID start, StreamEntryID end, int count, String consumername); - - Response> xpending(String key, String groupname, XPendingParams params); - - Response xdel(String key, StreamEntryID... ids); - - Response xtrim(String key, long maxLen, boolean approximateLength); - - Response xtrim(String key, XTrimParams params); - - Response> xclaim(String key, String group, String consumername, long minIdleTime, - long newIdleTime, int retries, boolean force, StreamEntryID... ids); - - Response> xclaim(String key, String group, String consumername, - long minIdleTime, XClaimParams params, StreamEntryID... ids); - - Response> xclaimJustId(String key, String group, String consumername, - long minIdleTime, XClaimParams params, StreamEntryID... ids); - - Response>> xautoclaim(String key, String group, String consumerName, - long minIdleTime, StreamEntryID start, XAutoClaimParams params); - - Response>> xautoclaimJustId(String key, String group, String consumerName, - long minIdleTime, StreamEntryID start, XAutoClaimParams params); - - Response bitpos(String key, boolean value); - - Response bitpos(String key, boolean value, BitPosParams params); - - Response set(String key, String value, SetParams params); - - Response> srandmember(String key, int count); - - Response> zrangeByScoreWithScores(String key, String min, String max); - - Response> zrangeByScoreWithScores(String key, String min, String max, int offset, int count); - - Response objectRefcount(String key); - - Response objectEncoding(String key); - - Response objectIdletime(String key); - - Response objectFreq(String key); - - Response incrByFloat(String key, double increment); - - Response psetex(String key, long milliseconds, String value); - - Response hincrByFloat(String key, String field, double increment); - - Response strAlgoLCSStrings(final String strA, final String strB, final StrAlgoLCSParams params); -} diff --git a/src/test/java/redis/clients/jedis/tests/UdsTest.java b/src/test/java/redis/clients/jedis/tests/UdsTest.java index 49e901337b..befc7ca699 100644 --- a/src/test/java/redis/clients/jedis/tests/UdsTest.java +++ b/src/test/java/redis/clients/jedis/tests/UdsTest.java @@ -9,7 +9,7 @@ //import redis.clients.jedis.HostAndPort; //import redis.clients.jedis.Jedis; -import redis.clients.jedis.JedisX; +import redis.clients.jedis.UnifiedJedis; import redis.clients.jedis.JedisSocketFactory; import redis.clients.jedis.Protocol; import redis.clients.jedis.exceptions.JedisConnectionException; @@ -20,7 +20,7 @@ public class UdsTest { @Test public void testConnectsToUds() { - try (JedisX jedis = new JedisX(new UdsJedisSocketFactory())) { + try (UnifiedJedis jedis = new UnifiedJedis(new UdsJedisSocketFactory())) { // assertEquals("PONG", jedis.ping()); } } diff --git a/src/test/java/redis/clients/jedis/tests/benchmark/GetSetBenchmark.java b/src/test/java/redis/clients/jedis/tests/benchmark/GetSetBenchmark.java index 83b9cd7674..57f03cd72e 100644 --- a/src/test/java/redis/clients/jedis/tests/benchmark/GetSetBenchmark.java +++ b/src/test/java/redis/clients/jedis/tests/benchmark/GetSetBenchmark.java @@ -7,7 +7,7 @@ import redis.clients.jedis.HostAndPort; //import redis.clients.jedis.Jedis; -import redis.clients.jedis.JedisX; +import redis.clients.jedis.UnifiedJedis; import redis.clients.jedis.Connection; import redis.clients.jedis.Protocol; import redis.clients.jedis.tests.HostAndPortUtil; @@ -23,7 +23,7 @@ public static void main(String[] args) throws UnknownHostException, IOException // jedis.flushAll(); Connection conn = new Connection(hnp, DefaultJedisClientConfig.builder().password("foobared").build()); conn.executeCommand(Protocol.Command.FLUSHALL); - JedisX jedis = new JedisX(conn); + UnifiedJedis jedis = new UnifiedJedis(conn); long begin = Calendar.getInstance().getTimeInMillis(); diff --git a/src/test/java/redis/clients/jedis/tests/commands/AllKindOfValuesCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/AllKindOfValuesCommandsTest.java index 95fea428f8..59ef4da09d 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/AllKindOfValuesCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/AllKindOfValuesCommandsTest.java @@ -34,7 +34,7 @@ import redis.clients.jedis.HostAndPort; //import redis.clients.jedis.Jedis; -import redis.clients.jedis.JedisX; +import redis.clients.jedis.UnifiedJedis; import redis.clients.jedis.Protocol.Keyword; import redis.clients.jedis.params.ScanParams; import redis.clients.jedis.resps.ScanResult; diff --git a/src/test/java/redis/clients/jedis/tests/commands/ClusterJedisCommandsTestBase.java b/src/test/java/redis/clients/jedis/tests/commands/ClusterJedisCommandsTestBase.java index 24672be74a..ee82b189e2 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/ClusterJedisCommandsTestBase.java +++ b/src/test/java/redis/clients/jedis/tests/commands/ClusterJedisCommandsTestBase.java @@ -12,7 +12,7 @@ import redis.clients.jedis.DefaultJedisClientConfig; import redis.clients.jedis.HostAndPort; import redis.clients.jedis.Jedis; -import redis.clients.jedis.JedisX; +import redis.clients.jedis.UnifiedJedis; import redis.clients.jedis.tests.HostAndPortUtil; import redis.clients.jedis.util.JedisClusterCRC16; @@ -26,7 +26,7 @@ public abstract class ClusterJedisCommandsTestBase { private HostAndPort nodeInfo3 = HostAndPortUtil.getClusterServers().get(2); private final Set jedisClusterNode = new HashSet<>(); // JedisCluster jedisCluster; - JedisX jedisCluster; + UnifiedJedis jedisCluster; @Before public void setUp() throws InterruptedException { @@ -73,7 +73,7 @@ public void setUp() throws InterruptedException { jedisClusterNode.add(new HostAndPort("127.0.0.1", 7379)); // jedisCluster = new JedisCluster(jedisClusterNode, 2000, 2000, 5, "cluster", new JedisPoolConfig()); - jedisCluster = new JedisX(jedisClusterNode, DefaultJedisClientConfig.builder().password("cluster").build(), 5); + jedisCluster = new UnifiedJedis(jedisClusterNode, DefaultJedisClientConfig.builder().password("cluster").build(), 5); } diff --git a/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java index 4f1dcb41f7..a53faab2df 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/ScriptingCommandsTest.java @@ -17,7 +17,7 @@ import org.junit.Test; //import redis.clients.jedis.Jedis; -import redis.clients.jedis.JedisX; +import redis.clients.jedis.UnifiedJedis; import redis.clients.jedis.args.FlushMode; import redis.clients.jedis.exceptions.JedisConnectionException; import redis.clients.jedis.exceptions.JedisDataException;