Jedis does support lpushx and rpushx
Conflicts: src/main/java/redis/clients/jedis/BinaryJedisCommands.java src/main/java/redis/clients/jedis/Pipeline.java
This commit is contained in:
@@ -154,4 +154,8 @@ public interface BinaryJedisCommands {
|
||||
Long zremrangeByScore(byte[] key, double start, double end);
|
||||
|
||||
Long linsert(byte[] key, LIST_POSITION where, byte[] pivot, byte[] value);
|
||||
|
||||
Long lpushx(byte[] key, byte[] string);
|
||||
|
||||
Long rpushx(byte[] key, byte[] string);
|
||||
}
|
||||
|
||||
@@ -190,6 +190,17 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
|
||||
return j.lpush(key, string);
|
||||
}
|
||||
|
||||
public Long lpushx(byte[] key, byte[] string) {
|
||||
Jedis j = getShard(key);
|
||||
return j.lpushx(key, string);
|
||||
}
|
||||
|
||||
|
||||
public Long rpushx(byte[] key, byte[] string) {
|
||||
Jedis j = getShard(key);
|
||||
return j.rpushx(key, string);
|
||||
}
|
||||
|
||||
public Long llen(byte[] key) {
|
||||
Jedis j = getShard(key);
|
||||
return j.llen(key);
|
||||
|
||||
@@ -160,4 +160,8 @@ public interface JedisCommands {
|
||||
|
||||
Long linsert(String key, Client.LIST_POSITION where, String pivot,
|
||||
String value);
|
||||
|
||||
Long lpushx(String key, String string);
|
||||
|
||||
Long rpushx(String key, String string);
|
||||
}
|
||||
|
||||
@@ -207,6 +207,16 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
|
||||
Jedis j = getShard(key);
|
||||
return j.lpush(key, string);
|
||||
}
|
||||
|
||||
public Long lpushx(String key, String string) {
|
||||
Jedis j = getShard(key);
|
||||
return j.lpushx(key, string);
|
||||
}
|
||||
|
||||
public Long rpushx(String key, String string) {
|
||||
Jedis j = getShard(key);
|
||||
return j.rpushx(key, string);
|
||||
}
|
||||
|
||||
public Long llen(String key) {
|
||||
Jedis j = getShard(key);
|
||||
|
||||
@@ -24,7 +24,7 @@ public abstract class Pool<T> {
|
||||
}
|
||||
}
|
||||
|
||||
public void returnResource(final T resource) {
|
||||
public void returnResource(final Object resource) {
|
||||
try {
|
||||
internalPool.returnObject(resource);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user