Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

list command receive now long parameters to be consistent with return…

… type
  • Loading branch information...
commit 4e15a23e41f92aad200168ec8507779b1e2abbb6 1 parent b6df473
@xetorthio xetorthio authored
View
10 src/main/java/redis/clients/jedis/BinaryClient.java
@@ -255,23 +255,23 @@ public void llen(final byte[] key) {
sendCommand(LLEN, key);
}
- public void lrange(final byte[] key, final int start, final int end) {
+ public void lrange(final byte[] key, final long start, final long end) {
sendCommand(LRANGE, key, toByteArray(start), toByteArray(end));
}
- public void ltrim(final byte[] key, final int start, final int end) {
+ public void ltrim(final byte[] key, final long start, final long end) {
sendCommand(LTRIM, key, toByteArray(start), toByteArray(end));
}
- public void lindex(final byte[] key, final int index) {
+ public void lindex(final byte[] key, final long index) {
sendCommand(LINDEX, key, toByteArray(index));
}
- public void lset(final byte[] key, final int index, final byte[] value) {
+ public void lset(final byte[] key, final long index, final byte[] value) {
sendCommand(LSET, key, toByteArray(index), value);
}
- public void lrem(final byte[] key, int count, final byte[] value) {
+ public void lrem(final byte[] key, long count, final byte[] value) {
sendCommand(LREM, key, toByteArray(count), value);
}
View
8 src/main/java/redis/clients/jedis/BinaryTransaction.java
@@ -207,22 +207,22 @@ public String discard() {
return getResponse(BuilderFactory.LONG);
}
- public Response<List<String>> lrange(byte[] key, int start, int end) {
+ public Response<List<String>> lrange(byte[] key, long start, int end) {
client.lrange(key, start, end);
return getResponse(BuilderFactory.STRING_LIST);
}
- public Response<Long> lrem(byte[] key, int count, byte[] value) {
+ public Response<Long> lrem(byte[] key, long count, byte[] value) {
client.lrem(key, count, value);
return getResponse(BuilderFactory.LONG);
}
- public Response<String> lset(byte[] key, int index, byte[] value) {
+ public Response<String> lset(byte[] key, long index, byte[] value) {
client.lset(key, index, value);
return getResponse(BuilderFactory.STRING);
}
- public Response<String> ltrim(byte[] key, int start, int end) {
+ public Response<String> ltrim(byte[] key, long start, long end) {
client.ltrim(key, start, end);
return getResponse(BuilderFactory.STRING);
}
View
20 src/main/java/redis/clients/jedis/Client.java
@@ -201,23 +201,23 @@ public void llen(final String key) {
llen(SafeEncoder.encode(key));
}
- public void lrange(final String key, final int start, final int end) {
+ public void lrange(final String key, final long start, final long end) {
lrange(SafeEncoder.encode(key), start, end);
}
- public void ltrim(final String key, final int start, final int end) {
+ public void ltrim(final String key, final long start, final long end) {
ltrim(SafeEncoder.encode(key), start, end);
}
- public void lindex(final String key, final int index) {
+ public void lindex(final String key, final long index) {
lindex(SafeEncoder.encode(key), index);
}
- public void lset(final String key, final int index, final String value) {
+ public void lset(final String key, final long index, final String value) {
lset(SafeEncoder.encode(key), index, SafeEncoder.encode(value));
}
- public void lrem(final String key, int count, final String value) {
+ public void lrem(final String key, long count, final String value) {
lrem(SafeEncoder.encode(key), count, SafeEncoder.encode(value));
}
@@ -436,23 +436,23 @@ public void zrangeByScoreWithScores(final String key, final double min,
}
public void zrevrangeByScore(final String key, final double max,
- final double min) {
+ final double min) {
zrevrangeByScore(SafeEncoder.encode(key), max, min);
}
public void zrevrangeByScore(final String key, final String max,
- final String min) {
+ final String min) {
zrevrangeByScore(SafeEncoder.encode(key), SafeEncoder.encode(max),
SafeEncoder.encode(min));
}
-
+
public void zrevrangeByScore(final String key, final double max,
- final double min, final int offset, int count) {
+ final double min, final int offset, int count) {
zrevrangeByScore(SafeEncoder.encode(key), max, min, offset, count);
}
public void zrevrangeByScoreWithScores(final String key, final double max,
- final double min) {
+ final double min) {
zrevrangeByScoreWithScores(SafeEncoder.encode(key), max, min);
}
View
20 src/main/java/redis/clients/jedis/Commands.java
@@ -1,9 +1,9 @@
package redis.clients.jedis;
-import redis.clients.jedis.BinaryClient.LIST_POSITION;
-
import java.util.Map;
+import redis.clients.jedis.BinaryClient.LIST_POSITION;
+
public interface Commands {
public void set(final String key, final String value);
@@ -92,15 +92,15 @@
public void llen(final String key);
- public void lrange(final String key, final int start, final int end);
+ public void lrange(final String key, final long start, final long end);
- public void ltrim(final String key, final int start, final int end);
+ public void ltrim(final String key, final long start, final long end);
- public void lindex(final String key, final int index);
+ public void lindex(final String key, final long index);
- public void lset(final String key, final int index, final String value);
+ public void lset(final String key, final long index, final String value);
- public void lrem(final String key, int count, final String value);
+ public void lrem(final String key, final long count, final String value);
public void lpop(final String key);
@@ -253,10 +253,10 @@ public void linsert(final String key, final LIST_POSITION where,
public void configGet(final String pattern);
public void configResetStat();
-
+
public void multi();
-
+
public void exec();
-
+
public void discard();
}
View
10 src/main/java/redis/clients/jedis/Jedis.java
@@ -958,7 +958,7 @@ public Long llen(final String key) {
* @return Multi bulk reply, specifically a list of elements in the
* specified range.
*/
- public List<String> lrange(final String key, final int start, final int end) {
+ public List<String> lrange(final String key, final long start, final long end) {
checkIsInMulti();
client.lrange(key, start, end);
return client.getMultiBulkReply();
@@ -998,7 +998,7 @@ public Long llen(final String key) {
* @param end
* @return Status code reply
*/
- public String ltrim(final String key, final int start, final int end) {
+ public String ltrim(final String key, final long start, final long end) {
checkIsInMulti();
client.ltrim(key, start, end);
return client.getStatusCodeReply();
@@ -1022,7 +1022,7 @@ public String ltrim(final String key, final int start, final int end) {
* @param index
* @return Bulk reply, specifically the requested element
*/
- public String lindex(final String key, final int index) {
+ public String lindex(final String key, final long index) {
checkIsInMulti();
client.lindex(key, index);
return client.getBulkReply();
@@ -1049,7 +1049,7 @@ public String lindex(final String key, final int index) {
* @param value
* @return Status code reply
*/
- public String lset(final String key, final int index, final String value) {
+ public String lset(final String key, final long index, final String value) {
checkIsInMulti();
client.lset(key, index, value);
return client.getStatusCodeReply();
@@ -1074,7 +1074,7 @@ public String lset(final String key, final int index, final String value) {
* @return Integer Reply, specifically: The number of removed elements if
* the operation succeeded
*/
- public Long lrem(final String key, final int count, final String value) {
+ public Long lrem(final String key, final long count, final String value) {
checkIsInMulti();
client.lrem(key, count, value);
return client.getIntegerReply();
View
18 src/main/java/redis/clients/jedis/JedisCommands.java
@@ -79,15 +79,15 @@
Long llen(String key);
- List<String> lrange(String key, int start, int end);
+ List<String> lrange(String key, long start, long end);
- String ltrim(String key, int start, int end);
+ String ltrim(String key, long start, long end);
- String lindex(String key, int index);
+ String lindex(String key, long index);
- String lset(String key, int index, String value);
+ String lset(String key, long index, String value);
- Long lrem(String key, int count, String value);
+ Long lrem(String key, long count, String value);
String lpop(String key);
@@ -136,18 +136,22 @@
Long zcount(String key, double min, double max);
Set<String> zrangeByScore(String key, double min, double max);
+
Set<String> zrevrangeByScore(String key, double max, double min);
Set<String> zrangeByScore(String key, double min, double max, int offset,
int count);
- Set<String> zrevrangeByScore(String key, double max, double min, int offset,
- int count);
+
+ Set<String> zrevrangeByScore(String key, double max, double min,
+ int offset, int count);
Set<Tuple> zrangeByScoreWithScores(String key, double min, double max);
+
Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min);
Set<Tuple> zrangeByScoreWithScores(String key, double min, double max,
int offset, int count);
+
Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min,
int offset, int count);
View
16 src/main/java/redis/clients/jedis/Pipeline.java
@@ -366,42 +366,42 @@ public void setClient(Client client) {
return getResponse(BuilderFactory.LONG);
}
- public Response<List<String>> lrange(String key, int start, int end) {
+ public Response<List<String>> lrange(String key, long start, long end) {
client.lrange(key, start, end);
return getResponse(BuilderFactory.STRING_LIST);
}
- public Response<List<String>> lrange(byte[] key, int start, int end) {
+ public Response<List<String>> lrange(byte[] key, long start, long end) {
client.lrange(key, start, end);
return getResponse(BuilderFactory.STRING_LIST);
}
- public Response<Long> lrem(String key, int count, String value) {
+ public Response<Long> lrem(String key, long count, String value) {
client.lrem(key, count, value);
return getResponse(BuilderFactory.LONG);
}
- public Response<Long> lrem(byte[] key, int count, byte[] value) {
+ public Response<Long> lrem(byte[] key, long count, byte[] value) {
client.lrem(key, count, value);
return getResponse(BuilderFactory.LONG);
}
- public Response<String> lset(String key, int index, String value) {
+ public Response<String> lset(String key, long index, String value) {
client.lset(key, index, value);
return getResponse(BuilderFactory.STRING);
}
- public Response<String> lset(byte[] key, int index, byte[] value) {
+ public Response<String> lset(byte[] key, long index, byte[] value) {
client.lset(key, index, value);
return getResponse(BuilderFactory.STRING);
}
- public Response<String> ltrim(String key, int start, int end) {
+ public Response<String> ltrim(String key, long start, long end) {
client.ltrim(key, start, end);
return getResponse(BuilderFactory.STRING);
}
- public Response<String> ltrim(byte[] key, int start, int end) {
+ public Response<String> ltrim(byte[] key, long start, long end) {
client.ltrim(key, start, end);
return getResponse(BuilderFactory.STRING);
}
View
10 src/main/java/redis/clients/jedis/ShardedJedis.java
@@ -214,27 +214,27 @@ public Long llen(String key) {
return j.llen(key);
}
- public List<String> lrange(String key, int start, int end) {
+ public List<String> lrange(String key, long start, long end) {
Jedis j = getShard(key);
return j.lrange(key, start, end);
}
- public String ltrim(String key, int start, int end) {
+ public String ltrim(String key, long start, long end) {
Jedis j = getShard(key);
return j.ltrim(key, start, end);
}
- public String lindex(String key, int index) {
+ public String lindex(String key, long index) {
Jedis j = getShard(key);
return j.lindex(key, index);
}
- public String lset(String key, int index, String value) {
+ public String lset(String key, long index, String value) {
Jedis j = getShard(key);
return j.lset(key, index, value);
}
- public Long lrem(String key, int count, String value) {
+ public Long lrem(String key, long count, String value) {
Jedis j = getShard(key);
return j.lrem(key, count, value);
}
View
8 src/main/java/redis/clients/jedis/Transaction.java
@@ -191,22 +191,22 @@ public Transaction(final Client client) {
return getResponse(BuilderFactory.LONG);
}
- public Response<List<String>> lrange(String key, int start, int end) {
+ public Response<List<String>> lrange(String key, long start, long end) {
client.lrange(key, start, end);
return getResponse(BuilderFactory.STRING_LIST);
}
- public Response<Long> lrem(String key, int count, String value) {
+ public Response<Long> lrem(String key, long count, String value) {
client.lrem(key, count, value);
return getResponse(BuilderFactory.LONG);
}
- public Response<String> lset(String key, int index, String value) {
+ public Response<String> lset(String key, long index, String value) {
client.lset(key, index, value);
return getResponse(BuilderFactory.STRING);
}
- public Response<String> ltrim(String key, int start, int end) {
+ public Response<String> ltrim(String key, long start, long end) {
client.ltrim(key, start, end);
return getResponse(BuilderFactory.STRING);
}
Please sign in to comment.
Something went wrong with that request. Please try again.