change HashOps#multiGet/#values return Collection->List
DATAREDIS-91
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package org.springframework.data.redis.core;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -38,13 +39,13 @@ public interface BoundHashOperations<H, HK, HV> extends BoundKeyOperations<H> {
|
||||
|
||||
Boolean putIfAbsent(HK key, HV value);
|
||||
|
||||
Collection<HV> multiGet(Collection<HK> keys);
|
||||
List<HV> multiGet(Collection<HK> keys);
|
||||
|
||||
void putAll(Map<? extends HK, ? extends HV> m);
|
||||
|
||||
Set<HK> keys();
|
||||
|
||||
Collection<HV> values();
|
||||
List<HV> values();
|
||||
|
||||
Long size();
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package org.springframework.data.redis.core;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -52,7 +53,7 @@ class DefaultBoundHashOperations<H, HK, HV> extends DefaultBoundKeyOperations<H>
|
||||
}
|
||||
|
||||
|
||||
public Collection<HV> multiGet(Collection<HK> hashKeys) {
|
||||
public List<HV> multiGet(Collection<HK> hashKeys) {
|
||||
return ops.multiGet(getKey(), hashKeys);
|
||||
}
|
||||
|
||||
@@ -97,7 +98,7 @@ class DefaultBoundHashOperations<H, HK, HV> extends DefaultBoundKeyOperations<H>
|
||||
}
|
||||
|
||||
|
||||
public Collection<HV> values() {
|
||||
public List<HV> values() {
|
||||
return ops.values(getKey());
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class DefaultHashOperations<K, HK, HV> extends AbstractOperations<K, Object> imp
|
||||
|
||||
|
||||
|
||||
public Collection<HV> multiGet(K key, Collection<HK> fields) {
|
||||
public List<HV> multiGet(K key, Collection<HK> fields) {
|
||||
if (fields.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package org.springframework.data.redis.core;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -32,7 +33,7 @@ public interface HashOperations<H, HK, HV> {
|
||||
|
||||
HV get(H key, Object hashKey);
|
||||
|
||||
Collection<HV> multiGet(H key, Collection<HK> hashKeys);
|
||||
List<HV> multiGet(H key, Collection<HK> hashKeys);
|
||||
|
||||
Long increment(H key, HK hashKey, long delta);
|
||||
|
||||
@@ -46,7 +47,7 @@ public interface HashOperations<H, HK, HV> {
|
||||
|
||||
Boolean putIfAbsent(H key, HK hashKey, HV value);
|
||||
|
||||
Collection<HV> values(H key);
|
||||
List<HV> values(H key);
|
||||
|
||||
Map<HK, HV> entries(H key);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user