hvals now return a Collection, not a Set neither a List.
This commit is contained in:
@@ -3,6 +3,7 @@ package redis.clients.jedis;
|
||||
import java.io.IOException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -844,11 +845,11 @@ public class BinaryJedis implements BinaryJedisCommands {
|
||||
* @param key
|
||||
* @return All the fields values contained into a hash.
|
||||
*/
|
||||
public Set<byte[]> hvals(final byte[] key) {
|
||||
public Collection<byte[]> hvals(final byte[] key) {
|
||||
checkIsInMulti();
|
||||
client.hvals(key);
|
||||
final List<byte[]> lresult = client.getBinaryMultiBulkReply();
|
||||
return new HashSet<byte[]>(lresult);
|
||||
return lresult;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package redis.clients.jedis;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -62,7 +63,7 @@ public interface BinaryJedisCommands {
|
||||
|
||||
Set<byte[]> hkeys(byte[] key);
|
||||
|
||||
Set<byte[]> hvals(byte[] key);
|
||||
Collection<byte[]> hvals(byte[] key);
|
||||
|
||||
Map<byte[], byte[]> hgetAll(byte[] key);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package redis.clients.jedis;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -169,7 +170,7 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo> implement
|
||||
return j.hkeys(key);
|
||||
}
|
||||
|
||||
public Set<byte[]> hvals(byte[] key) {
|
||||
public Collection<byte[]> hvals(byte[] key) {
|
||||
Jedis j = getShard(key);
|
||||
return j.hvals(key);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package redis.clients.jedis;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -773,11 +774,11 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
* @param key
|
||||
* @return All the fields values contained into a hash.
|
||||
*/
|
||||
public Set<String> hvals(final String key) {
|
||||
public Collection<String> hvals(final String key) {
|
||||
checkIsInMulti();
|
||||
client.hvals(key);
|
||||
final List<String> lresult = client.getMultiBulkReply();
|
||||
return new HashSet<String>(lresult);
|
||||
return lresult;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package redis.clients.jedis;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -60,7 +61,7 @@ public interface JedisCommands {
|
||||
|
||||
Set<String> hkeys(String key);
|
||||
|
||||
Set<String> hvals(String key);
|
||||
Collection<String> hvals(String key);
|
||||
|
||||
Map<String, String> hgetAll(String key);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package redis.clients.jedis;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -155,7 +156,7 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
|
||||
return j.hkeys(key);
|
||||
}
|
||||
|
||||
public Set<String> hvals(String key) {
|
||||
public Collection<String> hvals(String key) {
|
||||
Jedis j = getShard(key);
|
||||
return j.hvals(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user