Merge branch 'Issue221' of https://github.com/ivowiblo/jedis into issue221

Conflicts:
	src/main/java/redis/clients/jedis/BinaryJedisCommands.java
This commit is contained in:
Jonathan Leibiusky
2012-05-06 19:30:37 -03:00
4 changed files with 30 additions and 1 deletions

View File

@@ -181,4 +181,8 @@ public interface BinaryJedisCommands {
Long objectIdletime(byte[] key); Long objectIdletime(byte[] key);
byte[] objectEncoding(byte[] key); byte[] objectEncoding(byte[] key);
Long lpushx(byte[] key, byte[] string);
Long rpushx(byte[] key, byte[] string);
} }

View File

@@ -190,6 +190,17 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
return j.lpush(key, strings); return j.lpush(key, strings);
} }
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) { public Long llen(byte[] key) {
Jedis j = getShard(key); Jedis j = getShard(key);
return j.llen(key); return j.llen(key);

View File

@@ -186,4 +186,8 @@ public interface JedisCommands {
Long linsert(String key, Client.LIST_POSITION where, String pivot, Long linsert(String key, Client.LIST_POSITION where, String pivot,
String value); String value);
Long lpushx(String key, String string);
Long rpushx(String key, String string);
} }

View File

@@ -208,6 +208,16 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
return j.lpush(key, strings); return j.lpush(key, strings);
} }
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) { public Long llen(String key) {
Jedis j = getShard(key); Jedis j = getShard(key);
return j.llen(key); return j.llen(key);