Package com.arms.api.util.redisrepo
Class RedisZSetCommand
java.lang.Object
com.arms.api.util.redisrepo.RedisZSetCommand
-
Constructor Summary
ConstructorsConstructorDescriptionRedisZSetCommand(org.springframework.data.redis.core.RedisTemplate<String, Object> redisTemplate) -
Method Summary
Modifier and TypeMethodDescriptionZSet에 멤버와 score를 추가 (ZADD) score가 클수록 높은 순위 (reverseRange 시 먼저 반환)addIfAbsent(String key, Object value, double score) ZSet에 멤버가 없을 때만 추가 (ZADD NX)incrementScore(String key, Object value, double delta) 특정 멤버의 score를 증가 (ZINCRBY)score 오름차순으로 범위 조회 (ZRANGE) start=0, end=-1 이면 전체 조회rangeByScore(String key, double min, double max) score 범위로 멤버 조회 오름차순 (ZRANGEBYSCORE)특정 멤버의 오름차순 순위 조회 (ZRANK) 0부터 시작ZSet에서 멤버 삭제 (ZREM)removeRange(String key, long start, long end) 오름차순 순위 범위로 멤버 삭제 (ZREMRANGEBYRANK)removeRangeByScore(String key, double min, double max) score 범위로 멤버 삭제 (ZREMRANGEBYSCORE)reverseRange(String key, long start, long end) score 내림차순으로 범위 조회 (ZREVRANGE) 최신순 목록 조회에 사용 (score = timestamp)reverseRangeByScore(String key, double min, double max) score 범위로 멤버 조회 내림차순 (ZREVRANGEBYSCORE)reverseRank(String key, Object value) 특정 멤버의 내림차순 순위 조회 (ZREVRANK) 0부터 시작특정 멤버의 score 조회 (ZSCORE)ZSet의 멤버 수 조회 (ZCARD)
-
Constructor Details
-
RedisZSetCommand
-
-
Method Details
-
add
ZSet에 멤버와 score를 추가 (ZADD) score가 클수록 높은 순위 (reverseRange 시 먼저 반환) -
addIfAbsent
ZSet에 멤버가 없을 때만 추가 (ZADD NX) -
range
score 오름차순으로 범위 조회 (ZRANGE) start=0, end=-1 이면 전체 조회 -
reverseRange
score 내림차순으로 범위 조회 (ZREVRANGE) 최신순 목록 조회에 사용 (score = timestamp) -
rangeByScore
score 범위로 멤버 조회 오름차순 (ZRANGEBYSCORE) -
reverseRangeByScore
score 범위로 멤버 조회 내림차순 (ZREVRANGEBYSCORE) -
size
ZSet의 멤버 수 조회 (ZCARD) -
score
특정 멤버의 score 조회 (ZSCORE) -
rank
특정 멤버의 오름차순 순위 조회 (ZRANK) 0부터 시작 -
reverseRank
특정 멤버의 내림차순 순위 조회 (ZREVRANK) 0부터 시작 -
remove
ZSet에서 멤버 삭제 (ZREM) -
removeRange
오름차순 순위 범위로 멤버 삭제 (ZREMRANGEBYRANK) -
removeRangeByScore
score 범위로 멤버 삭제 (ZREMRANGEBYSCORE) -
incrementScore
특정 멤버의 score를 증가 (ZINCRBY)
-