public interface ISetCache<T>
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(String key,
Collection<T> values)
添加多个
|
void |
add(String key,
T value)
添加
|
void |
clear(String key)
清空 key 集合
|
Boolean |
contains(String key,
T value)
判断是否存在
|
Set<T> |
difference(Collection<String> keys)
获取 keys 中不同的值
|
Set<T> |
difference(String key,
Collection<String> otherKeys)
获取 key 中存在,otherKeys 中不存在的值
|
Set<T> |
difference(String key,
String otherKey)
获取 key 中存在,otherKey 中不存在的值
|
Long |
differenceAndStore(Collection<String> keys,
String destKey)
获取 keys 中不同的值,并存在 destKey 键下
|
Long |
differenceAndStore(String key,
Collection<String> otherKeys,
String destKey)
获取 key 中存在,otherKey 中不存在的值,并存在 destKey 键下
|
Set<T> |
distinctRandomValues(String key,
long count)
获取 count 个 key 的不重复随机值
|
Set<T> |
intersect(Collection<String> keys)
获取 keys 值的交集
|
Set<T> |
intersect(String key,
Collection<String> otherKeys)
获取 key 和 otherKeys 值的交集
|
Set<T> |
intersect(String key,
String otherKey)
获取 key 和 otherKey 值的交集
|
Long |
intersectAndStore(Collection<String> keys,
String destKey)
获取 keys 值的交集,并存在 destKey 键下
|
Long |
intersectAndStore(String key,
Collection<String> otherKeys,
String destKey)
获取 key 和 otherKeys 值的交集,并存在 destKey 键下
|
Boolean |
move(String key,
T value,
String destKey)
从 key 集合中移动 value 到 destKey 集合
|
T |
pop(String key)
从 key 中随机删除一个元素并返回删除的元素
|
List<T> |
pop(String key,
long count)
从 key 中随机删除 count 个元素并返回删除的元素
|
T |
randomValue(String key)
获取 key 的随机值
|
List<T> |
randomValues(String key,
long count)
获取 count 个 key 的随机值
|
Long |
remove(String key,
Collection<T> values)
删除值在 values 中的所有元素,返回删除元素的个数
|
void |
remove(String key,
T value)
删除值为 value 的所有元素
|
Set<T> |
scan(String key,
String pattern)
获取满足pattern表达式条件的所有元素
|
Long |
size(String key)
返回集合的长度
|
Set<T> |
union(Collection<String> keys)
获取 keys 值的并集
|
Set<T> |
union(String key,
Collection<String> otherKeys)
获取 key 和 otherKeys 值的并集
|
Set<T> |
union(String key,
String otherKey)
获取 key 和 otherKey 值的并集
|
Long |
unionAndStore(Collection<String> keys,
String destKey)
获取 keys 值的并集,并存在 destKey 键下
|
Long |
unionAndStore(String key,
Collection<String> otherKeys,
String destKey)
获取 key 和 otherKeys 值的并集,并存在 destKey 键下
|
Set<T> |
values(String key)
获取 key 的全部值
|
void add(String key, Collection<T> values)
key - 键values - 集合值Long remove(String key, Collection<T> values)
key - 键values - 集合值List<T> pop(String key, long count)
key - 键count - 数量Boolean move(String key, T value, String destKey)
key - 键value - 值destKey - 目标键List<T> randomValues(String key, long count)
key - 键count - 数量Set<T> distinctRandomValues(String key, long count)
key - 键count - 数量Set<T> intersect(String key, String otherKey)
key - 键otherKey - 其他键Set<T> intersect(String key, Collection<String> otherKeys)
key - 键otherKeys - 其他键集合Set<T> intersect(Collection<String> keys)
keys - 键集合Long intersectAndStore(String key, Collection<String> otherKeys, String destKey)
key - 键otherKeys - 其他键集合destKey - 目标键Long intersectAndStore(Collection<String> keys, String destKey)
keys - 键集合destKey - 目标键Set<T> union(String key, String otherKey)
key - 键otherKey - 其他键Set<T> union(String key, Collection<String> otherKeys)
key - 键otherKeys - 其他键集合Set<T> union(Collection<String> keys)
keys - 键集合Long unionAndStore(String key, Collection<String> otherKeys, String destKey)
key - 键otherKeys - 其他键集合destKey - 目标键Long unionAndStore(Collection<String> keys, String destKey)
keys - 键集合destKey - 目标键Set<T> difference(String key, String otherKey)
key - 键otherKey - 其他键Set<T> difference(String key, Collection<String> otherKeys)
key - 键otherKeys - 其他键集合Set<T> difference(Collection<String> keys)
keys - 键集合Long differenceAndStore(String key, Collection<String> otherKeys, String destKey)
key - 键otherKeys - 其他键集合destKey - 目标键Long differenceAndStore(Collection<String> keys, String destKey)
keys - 键集合destKey - 目标键Set<T> scan(String key, String pattern)
key - 键pattern - 表达式void clear(String key)
Copyright © 2021. All rights reserved.