微服务SpringBoot集成Redis开始使用操作String、List、hash、Zs

阅读: 评论:0

2024年1月30日发(作者:)

微服务SpringBoot集成Redis开始使用操作String、List、hash、Zs

* @param key * @return */ public Long zZCard(String key) { return ZSet().zCard(key); } /** *

获取集合中value元素的score值 * * @param key * @param value * @return */ public Double zScore(String key, Object value) { return ZSet().score(key, value); } /** *

移除指定索引位置的成员 * * @param key * @param start * @param end * @return */ public Long zRemoveRange(String key, long start, long end) { return ZSet().removeRange(key, start, end); } /** *

根据指定的score值的范围来移除成员 * * @param key * @param min * @param max * @return */ public Long zRemoveRangeByScore(String key, double min, double max) { return ZSet().removeRangeByScore(key, min, max); } /** *

获取key和otherKey的并集并存储在destKey中 * * @param key * @param otherKey * @param destKey * @return */ public Long zUnionAndStore(String key, String otherKey, String destKey) { return ZSet().unionAndStore(key, otherKey, destKey); } /** * * @param key * @param otherKeys * @param destKey * @return */ public Long zUnionAndStore(String key, Collection otherKeys, String destKey) { return ZSet() .unionAndStore(key, otherKeys, destKey); } /** *

交集 * * @param key * @param otherKey

(type, strings); return null; } }); return results; }ing> values){List results = ePipelined(new RedisCallback() {public Object doInRedis(RedisConnection connection) throws DataAccessException {StringRedisConnection stringRedisConn = (StringRedisConnection)connection;//集合转换数组String[] strings = y(new String[()]);//直接批量发送(type, strings);return null;}});return results;}

微服务SpringBoot集成Redis开始使用操作String、List、hash、Zs

本文发布于:2024-01-30 02:19:47,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170655238718541.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:集合   集成   移除   成员   开始   批量   发送   操作
留言与评论(共有 0 条评论)
   
验证码:
排行榜

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23