From c0136dfbf05ea3678988a92fad1f8935fa597616 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Sun, 12 Dec 2021 14:59:49 +0600 Subject: [PATCH] Address Javadoc warnings (and related changes) (#2730) --- .../java/redis/clients/jedis/Connection.java | 5 - src/main/java/redis/clients/jedis/Jedis.java | 427 +++++++++--------- .../java/redis/clients/jedis/Pipeline.java | 1 - .../java/redis/clients/jedis/Sentinel.java | 3 - .../clients/jedis/params/ScanParams.java | 6 - .../redis/clients/jedis/params/SetParams.java | 11 - .../clients/jedis/params/SortingParams.java | 2 +- .../redis/clients/jedis/params/ZParams.java | 29 +- 8 files changed, 225 insertions(+), 259 deletions(-) diff --git a/src/main/java/redis/clients/jedis/Connection.java b/src/main/java/redis/clients/jedis/Connection.java index 0e0b28c1f9..868ea26eba 100644 --- a/src/main/java/redis/clients/jedis/Connection.java +++ b/src/main/java/redis/clients/jedis/Connection.java @@ -277,11 +277,6 @@ public List getBinaryMultiBulkReply() { return (List) readProtocolWithCheckingBroken(); } - @Deprecated - public List getRawObjectMultiBulkReply() { - return getUnflushedObjectMultiBulkReply(); - } - @SuppressWarnings("unchecked") public List getUnflushedObjectMultiBulkReply() { return (List) readProtocolWithCheckingBroken(); diff --git a/src/main/java/redis/clients/jedis/Jedis.java b/src/main/java/redis/clients/jedis/Jedis.java index 866a208204..c1cf44c503 100644 --- a/src/main/java/redis/clients/jedis/Jedis.java +++ b/src/main/java/redis/clients/jedis/Jedis.java @@ -353,7 +353,7 @@ public String ping() { } /** - * Works same as {@link #ping()} but returns argument message instead of PONG. + * Works same as {@link Jedis#ping()} but returns argument message instead of PONG. * @param message * @return message */ @@ -636,14 +636,14 @@ public long dbSize() { * Set a timeout on the specified key. After the timeout the key will be automatically deleted by * the server. A key with an associated timeout is said to be volatile in Redis terminology. *

- * Volatile keys are stored on disk like the other keys, the timeout is persistent too like all the - * other aspects of the dataset. Saving a dataset containing expires and stopping the server does - * not stop the flow of time as Redis stores on disk the time when the key will no longer be + * Volatile keys are stored on disk like the other keys, the timeout is persistent too like all + * the other aspects of the dataset. Saving a dataset containing expires and stopping the server + * does not stop the flow of time as Redis stores on disk the time when the key will no longer be * available as Unix time, and not the remaining seconds. *

* Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire * set. It is also possible to undo the expire at all turning the key into a normal key using the - * {@link #persist(byte[]) PERSIST} command. + * {@link Jedis#persist(byte[]) PERSIST} command. *

* Time complexity: O(1) * @see Expire Command @@ -660,10 +660,10 @@ public long expire(final byte[] key, final long seconds) { } /** - * EXPIREAT works exactly like {@link #expire(byte[], int) EXPIRE} but instead to get the number of - * seconds representing the Time To Live of the key as a second argument (that is a relative way - * of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp (Number of - * seconds elapsed since 1 Gen 1970). + * EXPIREAT works exactly like {@link Jedis#expire(byte[], long) EXPIRE} but instead to get the + * number of seconds representing the Time To Live of the key as a second argument (that is a + * relative way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp + * (Number of seconds elapsed since 1 Gen 1970). *

* EXPIREAT was introduced in order to implement the Append Only File persistence mode so that * EXPIRE commands are automatically translated into EXPIREAT commands for the append only file. @@ -672,7 +672,7 @@ public long expire(final byte[] key, final long seconds) { *

* Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire * set. It is also possible to undo the expire at all turning the key into a normal key using the - * {@link #persist(byte[]) PERSIST} command. + * {@link Jedis#persist(byte[]) PERSIST} command. *

* Time complexity: O(1) * @see Expire Command @@ -690,8 +690,8 @@ public long expireAt(final byte[] key, final long unixTime) { /** * The TTL command returns the remaining time to live in seconds of a key that has an - * {@link #expire(byte[], int) EXPIRE} set. This introspection capability allows a Redis connection to - check how many seconds a given key will continue to be part of the dataset. + * {@link Jedis#expire(byte[], long) EXPIRE} set. This introspection capability allows a Redis + * connection to check how many seconds a given key will continue to be part of the dataset. * @param key * @return Integer reply, returns the remaining time to live in seconds of a key that has an * EXPIRE. If the Key does not exists or does not have an associated expire, -1 is @@ -722,8 +722,8 @@ public long touch(final byte[] key) { } /** - * Select the DB with having the specified zero-based numeric index. For default every new connection - connection is automatically selected to DB 0. + * Select the DB with having the specified zero-based numeric index. For default every new + * connection connection is automatically selected to DB 0. * @param index * @return Status code reply */ @@ -817,8 +817,8 @@ public List mget(final byte[]... keys) { } /** - * SETNX works exactly like {@link #set(byte[], byte[]) SET} with the only difference that if the - * key already exists no operation is performed. SETNX actually means "SET if Not eXists". + * SETNX works exactly like {@link Jedis#set(byte[], byte[]) SET} with the only difference that if + * the key already exists no operation is performed. SETNX actually means "SET if Not eXists". *

* Time complexity: O(1) * @param key @@ -833,8 +833,8 @@ public long setnx(final byte[] key, final byte[] value) { /** * The command is exactly equivalent to the following group of commands: - * {@link #set(byte[], byte[]) SET} + {@link #expire(byte[], int) EXPIRE}. The operation is - * atomic. + * {@link Jedis#set(byte[], byte[]) SET} + {@link Jedis#expire(byte[], long) EXPIRE}. The + * operation is atomic. *

* Time complexity: O(1) * @param key @@ -850,16 +850,16 @@ public String setex(final byte[] key, final long seconds, final byte[] value) { /** * Set the the respective keys to the respective values. MSET will replace old values with new - * values, while {@link Jedis#msetnx(byte[][]) MSETNX} will not perform any operation at all even if - * just a single key already exists. + * values, while {@link Jedis#msetnx(byte[][]) MSETNX} will not perform any operation at all even + * if just a single key already exists. *

* Because of this semantic MSETNX can be used in order to set different keys representing * different fields of an unique logic object in a way that ensures that either all the fields or * none at all are set. *

- Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B - are modified, another connection talking to Redis can either see the changes to both A and B at - once, or no modification at all. + * Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B + * are modified, another connection talking to Redis can either see the changes to both A and B at + * once, or no modification at all. * @see Jedis#msetnx(byte[][]) * @param keysvalues * @return Status code reply Basically +OK as MSET can't fail @@ -879,9 +879,9 @@ public String mset(final byte[]... keysvalues) { * different fields of an unique logic object in a way that ensures that either all the fields or * none at all are set. *

- Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B - are modified, another connection talking to Redis can either see the changes to both A and B at - once, or no modification at all. + * Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B + * are modified, another connection talking to Redis can either see the changes to both A and B at + * once, or no modification at all. * @see Jedis#mset(byte[][]) * @param keysvalues * @return Integer reply, specifically: 1 if the all the keys were set 0 if no key was set (at @@ -894,8 +894,8 @@ public long msetnx(final byte[]... keysvalues) { } /** - * DECRBY work just like {@link #decr(byte[]) INCR} but instead to decrement by 1 the decrement is - * integer. + * DECRBY work just like {@link Jedis#decr(byte[]) INCR} but instead to decrement by 1 the + * decrement is integer. *

* INCR commands are limited to 64 bit signed integers. *

@@ -941,8 +941,8 @@ public long decr(final byte[] key) { } /** - * INCRBY work just like {@link #incr(byte[]) INCR} but instead to increment by 1 the increment is - * integer. + * INCRBY work just like {@link Jedis#incr(byte[]) INCR} but instead to increment by 1 the + * increment is integer. *

* INCR commands are limited to 64 bit signed integers. *

@@ -965,7 +965,7 @@ public long incrBy(final byte[] key, final long increment) { } /** - * INCRBYFLOAT work just like {@link #incrBy(byte[], long)} INCRBY} but increments by floats + * INCRBYFLOAT work just like {@link Jedis#incrBy(byte[], long)} INCRBY} but increments by floats * instead of integers. *

* INCRBYFLOAT commands are limited to double precision floating point values. @@ -1640,7 +1640,7 @@ public long sadd(final byte[] key, final byte[]... members) { /** * Return all the members (elements) of the set value stored at key. This is just syntax glue for - * {@link #sinter(byte[]...)} SINTER}. + * {@link Jedis#sinter(byte[][])} SINTER}. *

* Time complexity O(N) * @param key the key of the set @@ -1672,8 +1672,8 @@ public long srem(final byte[] key, final byte[]... member) { * Remove a random element from a Set returning it as return value. If the Set is empty or the key * does not exist, a nil object is returned. *

- * The {@link #srandmember(byte[])} command does a similar work but the returned element is not - * removed from the Set. + * The {@link Jedis#srandmember(byte[])} command does a similar work but the returned element is + * not removed from the Set. *

* Time complexity O(1) * @param key @@ -1735,8 +1735,8 @@ public long scard(final byte[] key) { * Time complexity O(1) * @param key * @param member - * @return Boolean reply, specifically: true if the element is a member of the set false if the element - * is not a member of the set OR if the key does not exist + * @return Boolean reply, specifically: true if the element is a member of the set false if the + * element is not a member of the set OR if the key does not exist */ @Override public boolean sismember(final byte[] key, final byte[] member) { @@ -1750,7 +1750,8 @@ public boolean sismember(final byte[] key, final byte[] member) { * Time complexity O(N) where N is the number of elements being checked for membership * @param key * @param members - * @return List representing the membership of the given elements, in the same order as they are requested. + * @return List representing the membership of the given elements, in the same order as they are + * requested. */ @Override public List smismember(final byte[] key, final byte[]... members) { @@ -1760,10 +1761,10 @@ public List smismember(final byte[] key, final byte[]... members) { /** * Return the members of a set resulting from the intersection of all the sets hold at the - * specified keys. Like in {@link #lrange(byte[], long, long)} LRANGE} the result is sent to the - connection as a multi-bulk reply (see the protocol specification for more information). If just a - single key is specified, then this command produces the same result as - {@link #smembers(byte[]) SMEMBERS}. Actually SMEMBERS is just syntax sugar for SINTER. + * specified keys. Like in {@link Jedis#lrange(byte[], long, long)} LRANGE} the result is sent to + * the connection as a multi-bulk reply (see the protocol specification for more information). If + * just a single key is specified, then this command produces the same result as + * {@link Jedis#smembers(byte[]) SMEMBERS}. Actually SMEMBERS is just syntax sugar for SINTER. *

* Non existing keys are considered like empty sets, so if one of the keys is missing an empty set * is returned (since the intersection with an empty set always is an empty set). @@ -1780,8 +1781,8 @@ public Set sinter(final byte[]... keys) { } /** - * This commanad works exactly like {@link #sinter(byte[]...) SINTER} but instead of being returned - * the resulting set is stored as dstkey. + * This commanad works exactly like {@link Jedis#sinter(byte[][]) SINTER} but instead of being + * returned the resulting set is stored as dstkey. *

* Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the * number of sets @@ -1797,9 +1798,10 @@ public long sinterstore(final byte[] dstkey, final byte[]... keys) { /** * Return the members of a set resulting from the union of all the sets hold at the specified - * keys. Like in {@link #lrange(byte[], long, long)} LRANGE} the result is sent to the connection as a - multi-bulk reply (see the protocol specification for more information). If just a single key is - specified, then this command produces the same result as {@link #smembers(byte[]) SMEMBERS}. + * keys. Like in {@link Jedis#lrange(byte[], long, long)} LRANGE} the result is sent to the + * connection as a multi-bulk reply (see the protocol specification for more information). If just + * a single key is specified, then this command produces the same result as + * {@link Jedis#smembers(byte[]) SMEMBERS}. *

* Non existing keys are considered like empty sets. *

@@ -1814,8 +1816,9 @@ public Set sunion(final byte[]... keys) { } /** - * This command works exactly like {@link #sunion(byte[]...) SUNION} but instead of being returned - * the resulting set is stored as dstkey. Any existing value in dstkey will be over-written. + * This command works exactly like {@link Jedis#sunion(byte[][]) SUNION} but instead of being + * returned the resulting set is stored as dstkey. Any existing value in dstkey will be + * over-written. *

* Time complexity O(N) where N is the total number of elements in all the provided sets * @param dstkey @@ -2539,13 +2542,13 @@ public long zdiffStore(final byte[] dstkey, final byte[]... keys) { * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(byte[], double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(byte[], double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if the + * offset is large the commands needs to traverse the list for offset elements and this adds up to + * the O(M) figure. *

- * The {@link #zcount(byte[], double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(byte[], double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -2553,7 +2556,7 @@ public long zdiffStore(final byte[] dstkey, final byte[]... keys) { * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -2598,13 +2601,13 @@ public List zrangeByScore(final byte[] key, final byte[] min, final byte * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(byte[], double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(byte[], double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if offset + * is large the commands needs to traverse the list for offset elements and this adds up to the + * O(M) figure. *

- * The {@link #zcount(byte[], double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(byte[], double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -2612,7 +2615,7 @@ public List zrangeByScore(final byte[] key, final byte[] min, final byte * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -2661,13 +2664,13 @@ public List zrangeByScore(final byte[] key, final byte[] min, final byte * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(byte[], double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(byte[], double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if offset + * is large the commands needs to traverse the list for offset elements and this adds up to the + * O(M) figure. *

- * The {@link #zcount(byte[], double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(byte[], double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -2675,7 +2678,7 @@ public List zrangeByScore(final byte[] key, final byte[] min, final byte * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -2720,13 +2723,13 @@ public List zrangeByScoreWithScores(final byte[] key, final byte[] min, f * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(byte[], double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(byte[], double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if offset + * is large the commands needs to traverse the list for offset elements and this adds up to the + * O(M) figure. *

- * The {@link #zcount(byte[], double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(byte[], double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(byte[], double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -2734,7 +2737,7 @@ public List zrangeByScoreWithScores(final byte[] key, final byte[] min, f * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -2901,15 +2904,15 @@ public Set zunionWithScores(final ZParams params, final byte[]... keys) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(byte[], byte[]...)} ZINTERSTORE} command requires - * an element to be present in each of the given inputs to be inserted in the result. The {@link - * #zunionstore(byte[], byte[]...)} command inserts all elements across all inputs. + * As the terms imply, the {@link Jedis#zinterstore(byte[], byte[][])} ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(byte[], byte[][])} command inserts all elements across all inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -2932,15 +2935,16 @@ public long zunionstore(final byte[] dstkey, final byte[]... sets) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(byte[], byte[]...) ZINTERSTORE} command requires an - * element to be present in each of the given inputs to be inserted in the result. The {@link - * #zunionstore(byte[], byte[]...) ZUNIONSTORE} command inserts all elements across all inputs. + * As the terms imply, the {@link Jedis#zinterstore(byte[], byte[][]) ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(byte[], byte[][]) ZUNIONSTORE} command inserts all elements across + * all inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -2961,7 +2965,7 @@ public long zunionstore(final byte[] dstkey, final ZParams params, final byte[]. /** * Intersect multiple sorted sets, This command is similar to ZINTERSTORE, but instead of storing - the resulting sorted set, it is returned to the connection. + * the resulting sorted set, it is returned to the connection. * @param params * @param keys */ @@ -2973,7 +2977,7 @@ public Set zinter(final ZParams params, final byte[]... keys) { /** * Intersect multiple sorted sets, This command is similar to ZINTERSTORE, but instead of storing - the resulting sorted set, it is returned to the connection. + * the resulting sorted set, it is returned to the connection. * @param params * @param keys */ @@ -2988,15 +2992,16 @@ public Set zinterWithScores(final ZParams params, final byte[]... keys) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(byte[], byte[]...) ZINTERSTORE} command requires an - * element to be present in each of the given inputs to be inserted in the result. The {@link - * #zunionstore(byte[], byte[]...) ZUNIONSTORE} command inserts all elements across all inputs. + * As the terms imply, the {@link Jedis#zinterstore(byte[], byte[][]) ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(byte[], byte[][]) ZUNIONSTORE} command inserts all elements across all + * inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -3019,15 +3024,16 @@ public long zinterstore(final byte[] dstkey, final byte[]... sets) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(byte[], byte[]...) ZINTERSTORE} command requires an - * element to be present in each of the given inputs to be inserted in the result. The {@link - * #zunionstore(byte[], byte[]...) ZUNIONSTORE} command inserts all elements across all inputs. + * As the terms imply, the {@link Jedis#zinterstore(byte[], byte[][]) ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(byte[], byte[][]) ZUNIONSTORE} command inserts all elements across all + * inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -3092,8 +3098,8 @@ public long zremrangeByLex(final byte[] key, final byte[] min, final byte[] max) * completed, no connection is served in the meanwhile. An OK code is returned when the DB was * fully stored in disk. *

- * The background variant of this command is {@link #bgsave() BGSAVE} that is able to perform the - * saving in the background while the server continues serving other clients. + * The background variant of this command is {@link Jedis#bgsave() BGSAVE} that is able to perform + * the saving in the background while the server continues serving other clients. *

* @return Status code reply */ @@ -3140,9 +3146,9 @@ public String bgrewriteaof() { /** * Return the UNIX time stamp of the last successfully saving of the dataset on disk. *

- Return the UNIX TIME of the last DB save executed with success. A connection may check if a - {@link #bgsave() BGSAVE} command succeeded reading the LASTSAVE value, then issuing a BGSAVE - * command and checking at regular intervals every N seconds if LASTSAVE changed. + * Return the UNIX TIME of the last DB save executed with success. A connection may check if a + * {@link Jedis#bgsave() BGSAVE} command succeeded reading the LASTSAVE value, then issuing a + * BGSAVE command and checking at regular intervals every N seconds if LASTSAVE changed. * @return Integer reply, specifically an UNIX time stamp. */ @Override @@ -3156,8 +3162,8 @@ public long lastsave() { *

* Stop all the clients, save the DB, then quit the server. This commands makes sure that the DB * is switched off without the lost of any data. This is not guaranteed if the connection uses - * simply {@link #save() SAVE} and then {@link #quit() QUIT} because other clients may alter the - * DB data between the two commands. + * simply {@link Jedis#save() SAVE} and then {@link Jedis#quit() QUIT} because other clients may + * alter the DB data between the two commands. * @throws JedisException with the status code reply on error. On success nothing is thrown since * the server quits and the connection is closed. */ @@ -3375,7 +3381,7 @@ public String configRewrite() { * supported. *

* The list of configuration parameters supported by CONFIG SET can be obtained issuing a - * {@link #configGet(byte[]) CONFIG GET *} command. + * {@link Jedis#configGet(byte[]) CONFIG GET *} command. *

* The configuration set using CONFIG SET is immediately loaded by the Redis server that will * start acting as specified starting from the next command. @@ -3430,7 +3436,7 @@ public long lpushx(final byte[] key, final byte[]... string) { } /** - * Undo a {@link #expire(byte[], int) expire} at turning the expire key into a normal key. + * Undo a {@link Jedis#expire(byte[], long) expire} at turning the expire key into a normal key. *

* Time complexity: O(1) * @param key @@ -3733,7 +3739,7 @@ public String restore(final byte[] key, final long ttl, final byte[] serializedV *

* Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire * set. It is also possible to undo the expire at all turning the key into a normal key using the - * {@link #persist(byte[]) PERSIST} command. + * {@link Jedis#persist(byte[]) PERSIST} command. *

* Time complexity: O(1) * @see PEXPIRE Command @@ -3762,8 +3768,8 @@ public long pttl(final byte[] key) { } /** - * PSETEX works exactly like {@link #setex(byte[], int, byte[])} with the sole difference that the - * expire time is specified in milliseconds instead of seconds. Time complexity: O(1) + * PSETEX works exactly like {@link Jedis#setex(byte[], long, byte[])} with the sole difference + * that the expire time is specified in milliseconds instead of seconds. Time complexity: O(1) * @param key * @param milliseconds * @param value @@ -4492,7 +4498,6 @@ public Object sendCommand(ProtocolCommand cmd) { * @param dstKey the destination key. * @param db * @param replace - * @return */ @Override public boolean copy(String srcKey, String dstKey, int db, boolean replace) { @@ -4501,12 +4506,11 @@ public boolean copy(String srcKey, String dstKey, int db, boolean replace) { } /** - * COPY source destination [DB destination-db] [REPLACE] + * COPY source destination [REPLACE] * * @param srcKey the source key. * @param dstKey the destination key. * @param replace - * @return */ @Override public boolean copy(String srcKey, String dstKey, boolean replace) { @@ -4736,7 +4740,7 @@ public long renamenx(final String oldkey, final String newkey) { *

* Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire * set. It is also possible to undo the expire at all turning the key into a normal key using the - * {@link #persist(String) PERSIST} command. + * {@link Jedis#persist(String) PERSIST} command. *

* Time complexity: O(1) * @see Expire Command @@ -4753,10 +4757,10 @@ public long expire(final String key, final long seconds) { } /** - * EXPIREAT works exactly like {@link #expire(String, int) EXPIRE} but instead to get the number - * of seconds representing the Time To Live of the key as a second argument (that is a relative - * way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp (Number of - * seconds elapsed since 1 Gen 1970). + * EXPIREAT works exactly like {@link Jedis#expire(String, long) EXPIRE} but instead to get the + * number of seconds representing the Time To Live of the key as a second argument (that is a + * relative way of specifying the TTL), it takes an absolute one in the form of a UNIX timestamp + * (Number of seconds elapsed since 1 Gen 1970). *

* EXPIREAT was introduced in order to implement the Append Only File persistence mode so that * EXPIRE commands are automatically translated into EXPIREAT commands for the append only file. @@ -4765,7 +4769,7 @@ public long expire(final String key, final long seconds) { *

* Since Redis 2.1.3 you can update the value of the timeout of a key already having an expire * set. It is also possible to undo the expire at all turning the key into a normal key using the - * {@link #persist(String) PERSIST} command. + * {@link Jedis#persist(String) PERSIST} command. *

* Time complexity: O(1) * @see Expire Command @@ -4783,8 +4787,8 @@ public long expireAt(final String key, final long unixTime) { /** * The TTL command returns the remaining time to live in seconds of a key that has an - * {@link #expire(String, int) EXPIRE} set. This introspection capability allows a Redis connection to - check how many seconds a given key will continue to be part of the dataset. + * {@link Jedis#expire(String, long) EXPIRE} set. This introspection capability allows a Redis + * connection to check how many seconds a given key will continue to be part of the dataset. * @param key * @return Integer reply, returns the remaining time to live in seconds of a key that has an * EXPIRE. In Redis 2.6 or older, if the Key does not exists or does not have an @@ -4864,8 +4868,8 @@ public List mget(final String... keys) { } /** - * SETNX works exactly like {@link #set(String, String) SET} with the only difference that if the - * key already exists no operation is performed. SETNX actually means "SET if Not eXists". + * SETNX works exactly like {@link Jedis#set(String, String) SET} with the only difference that if + * the key already exists no operation is performed. SETNX actually means "SET if Not eXists". *

* Time complexity: O(1) * @param key @@ -4880,8 +4884,8 @@ public long setnx(final String key, final String value) { /** * The command is exactly equivalent to the following group of commands: - * {@link #set(String, String) SET} + {@link #expire(String, int) EXPIRE}. The operation is - * atomic. + * {@link Jedis#set(String, String) SET} + {@link Jedis#expire(String, long) EXPIRE}. The + * operation is atomic. *

* Time complexity: O(1) * @param key @@ -4897,16 +4901,16 @@ public String setex(final String key, final long seconds, final String value) { /** * Set the the respective keys to the respective values. MSET will replace old values with new - * values, while {@link #msetnx(String...) MSETNX} will not perform any operation at all even if - * just a single key already exists. + * values, while {@link Jedis#msetnx(String...) MSETNX} will not perform any operation at all even + * if just a single key already exists. *

* Because of this semantic MSETNX can be used in order to set different keys representing * different fields of an unique logic object in a way that ensures that either all the fields or * none at all are set. *

- Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B - are modified, another connection talking to Redis can either see the changes to both A and B at - once, or no modification at all. + * Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B + * are modified, another connection talking to Redis can either see the changes to both A and B at + * once, or no modification at all. * @see #msetnx(String...) * @param keysvalues * @return Status code reply Basically +OK as MSET can't fail @@ -4918,7 +4922,7 @@ public String mset(final String... keysvalues) { } /** - * Set the the respective keys to the respective values. {@link #mset(String...) MSET} will + * Set the the respective keys to the respective values. {@link Jedis#mset(String...) MSET} will * replace old values with new values, while MSETNX will not perform any operation at all even if * just a single key already exists. *

@@ -4926,9 +4930,9 @@ public String mset(final String... keysvalues) { * different fields of an unique logic object in a way that ensures that either all the fields or * none at all are set. *

- Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B - are modified, another connection talking to Redis can either see the changes to both A and B at - once, or no modification at all. + * Both MSET and MSETNX are atomic operations. This means that for instance if the keys A and B + * are modified, another connection talking to Redis can either see the changes to both A and B at + * once, or no modification at all. * @see #mset(String...) * @param keysvalues * @return Integer reply, specifically: 1 if the all the keys were set 0 if no key was set (at @@ -4941,8 +4945,8 @@ public long msetnx(final String... keysvalues) { } /** - * IDECRBY work just like {@link #decr(String) INCR} but instead to decrement by 1 the decrement - * is integer. + * IDECRBY work just like {@link Jedis#decr(String) INCR} but instead to decrement by 1 the + * decrement is integer. *

* INCR commands are limited to 64 bit signed integers. *

@@ -4988,8 +4992,8 @@ public long decr(final String key) { } /** - * INCRBY work just like {@link #incr(String) INCR} but instead to increment by 1 the increment is - * integer. + * INCRBY work just like {@link Jedis#incr(String) INCR} but instead to increment by 1 the + * increment is integer. *

* INCR commands are limited to 64 bit signed integers. *

@@ -5642,7 +5646,7 @@ public long sadd(final String key, final String... members) { /** * Return all the members (elements) of the set value stored at key. This is just syntax glue for - * {@link #sinter(String...) SINTER}. + * {@link Jedis#sinter(String...) SINTER}. *

* Time complexity O(N) * @param key @@ -5674,8 +5678,8 @@ public long srem(final String key, final String... members) { * Remove a random element from a Set returning it as return value. If the Set is empty or the key * does not exist, a nil object is returned. *

- * The {@link #srandmember(String)} command does a similar work but the returned element is not - * removed from the Set. + * The {@link Jedis#srandmember(String)} command does a similar work but the returned element is + * not removed from the Set. *

* Time complexity O(1) * @param key @@ -5763,10 +5767,10 @@ public List smismember(final String key, final String... members) { /** * Return the members of a set resulting from the intersection of all the sets hold at the - * specified keys. Like in {@link #lrange(String, long, long) LRANGE} the result is sent to the - connection as a multi-bulk reply (see the protocol specification for more information). If just a - single key is specified, then this command produces the same result as - {@link #smembers(String) SMEMBERS}. Actually SMEMBERS is just syntax sugar for SINTER. + * specified keys. Like in {@link Jedis#lrange(String, long, long) LRANGE} the result is sent to + * the connection as a multi-bulk reply (see the protocol specification for more information). If + * just a single key is specified, then this command produces the same result as + * {@link Jedis#smembers(String) SMEMBERS}. Actually SMEMBERS is just syntax sugar for SINTER. *

* Non existing keys are considered like empty sets, so if one of the keys is missing an empty set * is returned (since the intersection with an empty set always is an empty set). @@ -5783,8 +5787,8 @@ public Set sinter(final String... keys) { } /** - * This command works exactly like {@link #sinter(String...) SINTER} but instead of being returned - * the resulting set is stored as dstkey. + * This command works exactly like {@link Jedis#sinter(String...) SINTER} but instead of being + * returned the resulting set is stored as dstkey. *

* Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the * number of sets @@ -5800,9 +5804,10 @@ public long sinterstore(final String dstkey, final String... keys) { /** * Return the members of a set resulting from the union of all the sets hold at the specified - * keys. Like in {@link #lrange(String, long, long) LRANGE} the result is sent to the connection as a - multi-bulk reply (see the protocol specification for more information). If just a single key is - specified, then this command produces the same result as {@link #smembers(String) SMEMBERS}. + * keys. Like in {@link Jedis#lrange(String, long, long) LRANGE} the result is sent to the + * connection as a multi-bulk reply (see the protocol specification for more information). If just + * a single key is specified, then this command produces the same result as + * {@link Jedis#smembers(String) SMEMBERS}. *

* Non existing keys are considered like empty sets. *

@@ -5817,8 +5822,9 @@ public Set sunion(final String... keys) { } /** - * This command works exactly like {@link #sunion(String...) SUNION} but instead of being returned - * the resulting set is stored as dstkey. Any existing value in dstkey will be over-written. + * This command works exactly like {@link Jedis#sunion(String...) SUNION} but instead of being + * returned the resulting set is stored as dstkey. Any existing value in dstkey will be + * over-written. *

* Time complexity O(N) where N is the total number of elements in all the provided sets * @param dstkey @@ -5859,8 +5865,8 @@ public Set sdiff(final String... keys) { } /** - * This command works exactly like {@link #sdiff(String...) SDIFF} but instead of being returned - * the resulting set is stored in dstkey. + * This command works exactly like {@link Jedis#sdiff(String...) SDIFF} but instead of being + * returned the resulting set is stored in dstkey. * @param dstkey * @param keys * @return Status code reply @@ -6534,13 +6540,13 @@ public long zcount(final String key, final String min, final String max) { * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(String, double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(String, double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if offset + * is large the commands needs to traverse the list for offset elements and this adds up to the + * O(M) figure. *

- * The {@link #zcount(String, double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(String, double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -6548,7 +6554,7 @@ public long zcount(final String key, final String min, final String max) { * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -6594,13 +6600,13 @@ public List zrangeByScore(final String key, final String min, final Stri * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(String, double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(String, double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if offset + * is large the commands needs to traverse the list for offset elements and this adds up to the + * O(M) figure. *

- * The {@link #zcount(String, double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(String, double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -6608,7 +6614,7 @@ public List zrangeByScore(final String key, final String min, final Stri * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -6657,13 +6663,13 @@ public List zrangeByScore(final String key, final String min, final Stri * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(String, double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(String, double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if offset + * is large the commands needs to traverse the list for offset elements and this adds up to the + * O(M) figure. *

- * The {@link #zcount(String, double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(String, double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -6671,7 +6677,7 @@ public List zrangeByScore(final String key, final String min, final Stri * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -6716,13 +6722,13 @@ public List zrangeByScoreWithScores(final String key, final String min, f * The elements having the same score are returned sorted lexicographically as ASCII strings (this * follows from a property of Redis sorted sets and does not involve further computation). *

- * Using the optional {@link #zrangeByScore(String, double, double, int, int) LIMIT} it's possible - * to get only a range of the matching elements in an SQL-alike way. Note that if offset is large - * the commands needs to traverse the list for offset elements and this adds up to the O(M) - * figure. + * Using the optional {@link Jedis#zrangeByScore(String, double, double, int, int) LIMIT} it is + * possible to get only a range of the matching elements in an SQL-alike way. Note that if offset + * is large the commands needs to traverse the list for offset elements and this adds up to the + * O(M) figure. *

- * The {@link #zcount(String, double, double) ZCOUNT} command is similar to - * {@link #zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the + * The {@link Jedis#zcount(String, double, double) ZCOUNT} command is similar to + * {@link Jedis#zrangeByScore(String, double, double) ZRANGEBYSCORE} but instead of returning the * actual elements in the specified interval, it just returns the number of matching elements. *

* Exclusive intervals and infinity @@ -6730,7 +6736,7 @@ public List zrangeByScoreWithScores(final String key, final String min, f * min and max can be -inf and +inf, so that you are not required to know what's the greatest or * smallest element in order to take, for instance, elements "up to a given value". *

- * Also while the interval is for default closed (inclusive) it's possible to specify open + * Also while the interval is for default closed (inclusive) it is possible to specify open * intervals prefixing the score with a "(" character, so for instance: *

* {@code ZRANGEBYSCORE zset (1.3 5} @@ -6836,7 +6842,6 @@ public List zrevrangeByScoreWithScores(final String key, final String max * @param key * @param start * @param stop - * @return */ @Override public long zremrangeByRank(final String key, final long start, final long stop) { @@ -6871,10 +6876,9 @@ public long zremrangeByScore(final String key, final String min, final String ma /** * Add multiple sorted sets, This command is similar to ZUNIONSTORE, but instead of storing the - resulting sorted set, it is returned to the connection. + * resulting sorted set, it is returned to the connection. * @param params * @param keys - * @return */ @Override public Set zunion(ZParams params, String... keys) { @@ -6883,11 +6887,10 @@ public Set zunion(ZParams params, String... keys) { } /** - * Add multiple sorted sets with scores, This command is similar to ZUNIONSTORE, but instead of storing the - resulting sorted set, it is returned to the connection. + * Add multiple sorted sets with scores, This command is similar to ZUNIONSTORE, but instead of + * storing the resulting sorted set, it is returned to the connection. * @param params * @param keys - * @return */ @Override public Set zunionWithScores(ZParams params, String... keys) { @@ -6900,16 +6903,16 @@ public Set zunionWithScores(ZParams params, String... keys) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(String, String...) ZINTERSTORE} command requires an - * element to be present in each of the given inputs to be inserted in the result. The - * {@link #zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across all - * inputs. + * As the terms imply, the {@link Jedis#zinterstore(String, String...) ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across + * all inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -6936,16 +6939,16 @@ public long zunionstore(final String dstkey, final String... sets) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(String, String...) ZINTERSTORE} command requires an - * element to be present in each of the given inputs to be inserted in the result. The - * {@link #zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across all - * inputs. + * As the terms imply, the {@link Jedis#zinterstore(String, String...) ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across + * all inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -6970,10 +6973,9 @@ public long zunionstore(final String dstkey, final ZParams params, final String. /** * Intersect multiple sorted sets, This command is similar to ZINTERSTORE, but instead of storing - the resulting sorted set, it is returned to the connection. + * the resulting sorted set, it is returned to the connection. * @param params * @param keys - * @return */ @Override public Set zinter(final ZParams params, final String... keys) { @@ -6983,10 +6985,9 @@ public Set zinter(final ZParams params, final String... keys) { /** * Intersect multiple sorted sets, This command is similar to ZINTERSTORE, but instead of storing - the resulting sorted set, it is returned to the connection. + * the resulting sorted set, it is returned to the connection. * @param params * @param keys - * @return */ @Override public Set zinterWithScores(final ZParams params, final String... keys) { @@ -6999,16 +7000,16 @@ public Set zinterWithScores(final ZParams params, final String... keys) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(String, String...) ZINTERSTORE} command requires an - * element to be present in each of the given inputs to be inserted in the result. The - * {@link #zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across all - * inputs. + * As the terms imply, the {@link Jedis#zinterstore(String, String...) ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across + * all inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -7035,16 +7036,16 @@ public long zinterstore(final String dstkey, final String... sets) { * dstkey. It is mandatory to provide the number of input keys N, before passing the input keys * and the other (optional) arguments. *

- * As the terms imply, the {@link #zinterstore(String, String...) ZINTERSTORE} command requires an - * element to be present in each of the given inputs to be inserted in the result. The - * {@link #zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across all - * inputs. + * As the terms imply, the {@link Jedis#zinterstore(String, String...) ZINTERSTORE} command + * requires an element to be present in each of the given inputs to be inserted in the result. The + * {@link Jedis#zunionstore(String, String...) ZUNIONSTORE} command inserts all elements across + * all inputs. *

* Using the WEIGHTS option, it is possible to add weight to each input sorted set. This means * that the score of each element in the sorted set is first multiplied by this weight before * being passed to the aggregation. When this option is not given, all weights default to 1. *

- * With the AGGREGATE option, it's possible to specify how the results of the union or + * With the AGGREGATE option, it is possible to specify how the results of the union or * intersection are aggregated. This option defaults to SUM, where the score of an element is * summed across the inputs where it exists. When this option is set to be either MIN or MAX, the * resulting set will contain the minimum or maximum score of an element across the inputs where @@ -7143,7 +7144,7 @@ public long lpushx(final String key, final String... string) { } /** - * Undo a {@link #expire(String, int) expire} at turning the expire key into a normal key. + * Undo a {@link Jedis#expire(String, long) expire} at turning the expire key into a normal key. *

* Time complexity: O(1) * @param key @@ -7194,7 +7195,6 @@ public String brpoplpush(final String source, final String destination, final in * @param key * @param offset * @param value - * @return */ @Override public boolean setbit(final String key, final long offset, final boolean value) { @@ -7206,7 +7206,6 @@ public boolean setbit(final String key, final long offset, final boolean value) * Returns the bit value at offset in the string value stored at key * @param key * @param offset - * @return */ @Override public boolean getbit(final String key, final long offset) { @@ -7291,7 +7290,7 @@ public List configGet(final String pattern) { * supported. *

* The list of configuration parameters supported by CONFIG SET can be obtained issuing a - * {@link #configGet(String) CONFIG GET *} command. + * {@link Jedis#configGet(String) CONFIG GET *} command. *

* The configuration set using CONFIG SET is immediately loaded by the Redis server that will * start acting as specified starting from the next command. @@ -7524,8 +7523,8 @@ public long pttl(final String key) { } /** - * PSETEX works exactly like {@link #setex(String, int, String)} with the sole difference that the - * expire time is specified in milliseconds instead of seconds. Time complexity: O(1) + * PSETEX works exactly like {@link Jedis#setex(String, long, String)} with the sole difference + * that the expire time is specified in milliseconds instead of seconds. Time complexity: O(1) * @param key * @param milliseconds * @param value diff --git a/src/main/java/redis/clients/jedis/Pipeline.java b/src/main/java/redis/clients/jedis/Pipeline.java index 53139e16cd..76e8e5c982 100644 --- a/src/main/java/redis/clients/jedis/Pipeline.java +++ b/src/main/java/redis/clients/jedis/Pipeline.java @@ -90,7 +90,6 @@ public List syncAndReturnAll() { } } - @Deprecated public final boolean hasPipelinedResponse() { return getPipelinedResponseLength() > 0; } diff --git a/src/main/java/redis/clients/jedis/Sentinel.java b/src/main/java/redis/clients/jedis/Sentinel.java index d79a4d841f..4352bf1e3d 100644 --- a/src/main/java/redis/clients/jedis/Sentinel.java +++ b/src/main/java/redis/clients/jedis/Sentinel.java @@ -256,7 +256,6 @@ public String sentinelMyId() { * 24) "2" * * - * @return */ @Override public List> sentinelMasters() { @@ -299,7 +298,6 @@ public List sentinelGetMasterAddrByName(String masterName) { * (integer) 1 * * @param pattern - * @return */ @Override public Long sentinelReset(String pattern) { @@ -340,7 +338,6 @@ public Long sentinelReset(String pattern) { * 28) "100" * * @param masterName - * @return */ @Override public List> sentinelSlaves(String masterName) { diff --git a/src/main/java/redis/clients/jedis/params/ScanParams.java b/src/main/java/redis/clients/jedis/params/ScanParams.java index 8efd384f46..73c2b7e4e6 100644 --- a/src/main/java/redis/clients/jedis/params/ScanParams.java +++ b/src/main/java/redis/clients/jedis/params/ScanParams.java @@ -27,9 +27,6 @@ public ScanParams match(final byte[] pattern) { /** * @see MATCH option in Redis documentation - * - * @param pattern - * @return */ public ScanParams match(final String pattern) { params.put(MATCH, ByteBuffer.wrap(SafeEncoder.encode(pattern))); @@ -38,9 +35,6 @@ public ScanParams match(final String pattern) { /** * @see COUNT option in Redis documentation - * - * @param count - * @return */ public ScanParams count(final Integer count) { params.put(COUNT, ByteBuffer.wrap(Protocol.toByteArray(count))); diff --git a/src/main/java/redis/clients/jedis/params/SetParams.java b/src/main/java/redis/clients/jedis/params/SetParams.java index 015f157555..5e3627cc10 100644 --- a/src/main/java/redis/clients/jedis/params/SetParams.java +++ b/src/main/java/redis/clients/jedis/params/SetParams.java @@ -22,17 +22,6 @@ public static SetParams setParams() { return new SetParams(); } - /** - * Set the specified expire time, in seconds. - * @param secondsToExpire - * @return SetParams - * @deprecated Use {@link #ex(long)}. - */ - @Deprecated - public SetParams ex(int secondsToExpire) { - return ex((long) secondsToExpire); - } - /** * Set the specified expire time, in seconds. * @param secondsToExpire diff --git a/src/main/java/redis/clients/jedis/params/SortingParams.java b/src/main/java/redis/clients/jedis/params/SortingParams.java index f732f93a47..4e5aeeeda7 100644 --- a/src/main/java/redis/clients/jedis/params/SortingParams.java +++ b/src/main/java/redis/clients/jedis/params/SortingParams.java @@ -18,7 +18,7 @@ import redis.clients.jedis.util.SafeEncoder; /** - * Builder Class for {@link Jedis#sort(String, SortingParams) SORT} Parameters. + * Builder Class for {@code SORT} command parameters. */ public class SortingParams implements IParams { private final List params = new ArrayList<>(); diff --git a/src/main/java/redis/clients/jedis/params/ZParams.java b/src/main/java/redis/clients/jedis/params/ZParams.java index b30e1680cf..b4edc3b808 100644 --- a/src/main/java/redis/clients/jedis/params/ZParams.java +++ b/src/main/java/redis/clients/jedis/params/ZParams.java @@ -7,48 +7,41 @@ import java.util.List; import redis.clients.jedis.CommandArguments; -import redis.clients.jedis.Protocol; +import redis.clients.jedis.args.Rawable; import redis.clients.jedis.util.SafeEncoder; public class ZParams implements IParams { - public enum Aggregate { + public enum Aggregate implements Rawable { + SUM, MIN, MAX; - /** - * @deprecated This will be private in future. Use {@link #getRaw()}. - */ - @Deprecated - public final byte[] raw; + private final byte[] raw; - Aggregate() { + private Aggregate() { raw = SafeEncoder.encode(name()); } + @Override public byte[] getRaw() { return raw; } } - private final List params = new ArrayList<>(); + private final List params = new ArrayList<>(); - /** - * Set weights. - * @param weights weights. - * @return - */ public ZParams weights(final double... weights) { - params.add(WEIGHTS.getRaw()); + params.add(WEIGHTS); for (final double weight : weights) { - params.add(Protocol.toByteArray(weight)); + params.add(weight); } return this; } public ZParams aggregate(final Aggregate aggregate) { - params.add(AGGREGATE.getRaw()); - params.add(aggregate.raw); + params.add(AGGREGATE); + params.add(aggregate); return this; }