public class RedisZSetProvider<T> extends Object implements IZSetCache<T>
| 构造器和说明 |
|---|
RedisZSetProvider(org.springframework.data.redis.core.RedisTemplate template) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(String key,
Collection<T> values,
double score)
添加多个
|
void |
add(String key,
T value,
double score)
添加
|
void |
clear(String key)
清空 key 集合
|
Double |
incrementScore(String key,
T value,
double delta)
添加,分数递增
|
Long |
intersectAndStore(String key,
Collection<String> otherKeys,
String destKey)
获取 key 和 otherKeys 值的交集,并存在 destKey 键下
|
Long |
intersectAndStore(String key,
Collection<String> otherKeys,
String destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate)
获取 key 和 otherKeys 值的交集并联合排序,并存在 destKey 键下
|
Long |
intersectAndStore(String key,
Collection<String> otherKeys,
String destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate,
org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
获取 key 和 otherKeys 值的交集并联合排序,并存在 destKey 键下
|
Long |
intersectAndStore(String key,
String otherKey,
String destKey)
获取 key 和 otherKey 值的交集,并存在 destKey 键下
|
Set<T> |
range(String key,
long start,
long end)
获取范围值
|
Set<T> |
rangeByScore(String key,
double min,
double max)
获取分数在 [min, max] 之间的值
|
Set<T> |
rangeByScore(String key,
double min,
double max,
long offset,
long count)
获取 count 个 分数在 [min, max] 之间的值
|
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> |
rangeByScoreWithScores(String key,
double min,
double max)
获取分数在 [min, max] 之间的值和分数
|
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> |
rangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
获取 count 个 分数在 [min, max] 之间的值和分数
|
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> |
rangeWithScores(String key,
long start,
long end)
获取范围值和分数
|
Long |
rank(String key,
T value)
获取排名
|
Long |
remove(String key,
Collection<T> values)
删除值在 values 中的所有元素,返回删除元素的个数
|
void |
remove(String key,
T value)
删除值为 value 的所有元素
|
Long |
removeRange(String key,
long start,
long end)
删除 [start, end] 之间的值
|
Long |
removeRangeByScore(String key,
double min,
double max)
删除分数在 [min, max] 之间的值
|
Set<T> |
reverseRange(String key,
long start,
long end)
获取范围值,倒序排名
|
Set<T> |
reverseRangeByScore(String key,
double min,
double max)
获取分数在 [min, max] 之间的值,倒序排名
|
Set<T> |
reverseRangeByScore(String key,
double min,
double max,
long offset,
long count)
获取 count 个 分数在 [min, max] 之间的值,倒序排名
|
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> |
reverseRangeByScoreWithScores(String key,
double min,
double max)
获取分数在 [min, max] 之间的值和分数,倒序排名
|
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> |
reverseRangeByScoreWithScores(String key,
double min,
double max,
long offset,
long count)
获取 count 个 分数在 [min, max] 之间的值和分数,倒序排名
|
Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> |
reverseRangeWithScores(String key,
long start,
long end)
获取范围值和分数,倒序排名
|
Long |
reverseRank(String key,
T value)
获取倒序排名
|
Set<T> |
scan(String key,
String pattern)
获取满足pattern表达式条件的所有元素
|
Double |
score(String key,
T value)
获取集合 value 的分数
|
Long |
size(String key)
返回集合的长度
|
Long |
unionAndStore(String key,
Collection<String> otherKeys,
String destKey)
获取 key 和 otherKeys 值的并集,并存在 destKey 键下
|
Long |
unionAndStore(String key,
Collection<String> otherKeys,
String destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate)
获取 key 和 otherKeys 值的并集并联合排序,并存在 destKey 键下
|
Long |
unionAndStore(String key,
Collection<String> otherKeys,
String destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate,
org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
获取 key 和 otherKeys 值的并集并联合排序,并存在 destKey 键下
|
Long |
unionAndStore(String key,
String otherKey,
String destKey)
获取 key 和 otherKey 值的并集,并存在 destKey 键下
|
public RedisZSetProvider(org.springframework.data.redis.core.RedisTemplate template)
public void add(String key, T value, double score)
IZSetCacheadd 在接口中 IZSetCache<T>key - 键value - 值score - 分数public void add(String key, Collection<T> values, double score)
IZSetCacheadd 在接口中 IZSetCache<T>key - 键values - 集合值score - 分数public Double incrementScore(String key, T value, double delta)
IZSetCacheincrementScore 在接口中 IZSetCache<T>key - 键value - 值delta - 递增值public void remove(String key, T value)
IZSetCacheremove 在接口中 IZSetCache<T>key - 键value - 值public Long remove(String key, Collection<T> values)
IZSetCacheremove 在接口中 IZSetCache<T>key - 键values - 集合值public Long rank(String key, T value)
IZSetCacherank 在接口中 IZSetCache<T>key - 键value - 值public Long reverseRank(String key, T value)
IZSetCachereverseRank 在接口中 IZSetCache<T>key - 键value - 值public Set<T> range(String key, long start, long end)
IZSetCacherange 在接口中 IZSetCache<T>key - 键start - 开始位置end - 结束位置public Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> rangeWithScores(String key, long start, long end)
IZSetCacherangeWithScores 在接口中 IZSetCache<T>key - 键start - 开始位置end - 结束位置public Set<T> rangeByScore(String key, double min, double max)
IZSetCacherangeByScore 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分public Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> rangeByScoreWithScores(String key, double min, double max)
IZSetCacherangeByScoreWithScores 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分public Set<T> rangeByScore(String key, double min, double max, long offset, long count)
IZSetCacherangeByScore 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分offset - offsetcount - 数量public Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> rangeByScoreWithScores(String key, double min, double max, long offset, long count)
IZSetCacherangeByScoreWithScores 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分offset - offsetcount - 数量public Set<T> reverseRange(String key, long start, long end)
IZSetCachereverseRange 在接口中 IZSetCache<T>key - 键start - 开始位置end - 结束位置public Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> reverseRangeWithScores(String key, long start, long end)
IZSetCachereverseRangeWithScores 在接口中 IZSetCache<T>key - 键start - 开始位置end - 结束位置public Set<T> reverseRangeByScore(String key, double min, double max)
IZSetCachereverseRangeByScore 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分public Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> reverseRangeByScoreWithScores(String key, double min, double max)
IZSetCachereverseRangeByScoreWithScores 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分public Set<T> reverseRangeByScore(String key, double min, double max, long offset, long count)
IZSetCachereverseRangeByScore 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分offset - offsetcount - 数量public Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<Object>> reverseRangeByScoreWithScores(String key, double min, double max, long offset, long count)
IZSetCachereverseRangeByScoreWithScores 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分offset - offsetcount - 数量public Long size(String key)
IZSetCachesize 在接口中 IZSetCache<T>key - 键public Double score(String key, T value)
IZSetCachescore 在接口中 IZSetCache<T>key - 键value - 值public Long removeRange(String key, long start, long end)
IZSetCacheremoveRange 在接口中 IZSetCache<T>key - 键start - 开始位置end - 结束位置public Long removeRangeByScore(String key, double min, double max)
IZSetCacheremoveRangeByScore 在接口中 IZSetCache<T>key - 键min - 最小分max - 最大分public Long unionAndStore(String key, String otherKey, String destKey)
IZSetCacheunionAndStore 在接口中 IZSetCache<T>key - 键otherKey - 其他键destKey - 目标键public Long unionAndStore(String key, Collection<String> otherKeys, String destKey)
IZSetCacheunionAndStore 在接口中 IZSetCache<T>key - 键otherKeys - 其他键集合destKey - 目标键public Long unionAndStore(String key, Collection<String> otherKeys, String destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate)
IZSetCacheunionAndStore 在接口中 IZSetCache<T>key - 键otherKeys - 其他键集合destKey - 目标键aggregate - RedisZSetCommands.Aggregatepublic Long unionAndStore(String key, Collection<String> otherKeys, String destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate, org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
IZSetCacheunionAndStore 在接口中 IZSetCache<T>key - 键otherKeys - 其他键集合destKey - 目标键aggregate - RedisZSetCommands.Aggregateweights - RedisZSetCommands.Weightspublic Long intersectAndStore(String key, String otherKey, String destKey)
IZSetCacheintersectAndStore 在接口中 IZSetCache<T>key - 键otherKey - 其他键destKey - 目标键public Long intersectAndStore(String key, Collection<String> otherKeys, String destKey)
IZSetCacheintersectAndStore 在接口中 IZSetCache<T>key - 键otherKeys - 其他键集合destKey - 目标键public Long intersectAndStore(String key, Collection<String> otherKeys, String destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate)
IZSetCacheintersectAndStore 在接口中 IZSetCache<T>key - 键otherKeys - 其他键集合destKey - 目标键aggregate - RedisZSetCommands.Aggregatepublic Long intersectAndStore(String key, Collection<String> otherKeys, String destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate, org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
IZSetCacheintersectAndStore 在接口中 IZSetCache<T>key - 键otherKeys - 其他键集合destKey - 目标键aggregate - RedisZSetCommands.Aggregateweights - RedisZSetCommands.Weightspublic Set<T> scan(String key, String pattern)
IZSetCachescan 在接口中 IZSetCache<T>key - 键pattern - 表达式public void clear(String key)
IZSetCacheclear 在接口中 IZSetCache<T>Copyright © 2021. All rights reserved.