rename exists to hasKey()
This commit is contained in:
@@ -50,7 +50,7 @@ public interface RedisOperations<K, V> {
|
||||
*/
|
||||
<T> T execute(RedisCallback<T> action);
|
||||
|
||||
Boolean exists(K key);
|
||||
Boolean hasKey(K key);
|
||||
|
||||
void delete(Collection<K> key);
|
||||
|
||||
|
||||
@@ -407,7 +407,7 @@ public class RedisTemplate<K, V> extends RedisAccessor implements RedisOperation
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean exists(K key) {
|
||||
public Boolean hasKey(K key) {
|
||||
final byte[] rawKey = rawKey(key);
|
||||
|
||||
return execute(new RedisCallback<Boolean>() {
|
||||
|
||||
Reference in New Issue
Block a user