当前位置:网站首页>Difference between boundvalueops and opsforvalue
Difference between boundvalueops and opsforvalue
2022-06-27 07:16:00 【Exquisite·】
/** obtain a, And get b, Then delete c, To the same key There are multiple operations , according to opsForHash() Writing * Every time redisTemplate.opsForHash().xxx("key","value") The writing is very wordy */
int result = (Integer) redisTemplate.opsForHash().get("hash-key","a");
result = (Integer)redisTemplate.opsForHash().get("hash-key","b");
redisTemplate.opsForHash().delete("hash-key","c");
/** * boundHashOps() It's going directly to key and boundHashOperations Object is bound , * Go straight through boundHashOperations Object to perform relevant operations , The writing is concise , Unwanted * Each time, it will explicitly key Write out */
BoundHashOperations<String, String, Object> boundHashOperations = redisTemplate.boundHashOps("hash-key");
result = (Integer) boundHashOperations.get("a");
result = (Integer) boundHashOperations.get("b");
boundHashOperations.delete("c");
// The above is my humble opinion , If there is any wrong , Welcome to correct
边栏推荐
- One year's experience of technical personnel in Entrepreneurship
- 2022 CISP-PTE(一)文件包含
- OpenCV怎么下载?OpenCV下载后怎么配置?
- Overview of database schema in tidb
- Fast realization of Bluetooth communication between MCU and mobile phone
- guava 教程收集一些案例慢慢写 google工具类
- Interviewer: please introduce cache penetration, cache null value, cache avalanche and cache breakdown, which are easy to understand
- 如何优雅的写 Controller 层代码?
- How to download opencv? How to configure opencv after downloading?
- Fast implementation of thread mesh networking
猜你喜欢
正斜杠反斜杠的由来
面试官:你天天用 Lombok,说说它什么原理?我竟然答不上来…
On gpu: historical development and structure
[openairinterface5g] rrcsetupcomplete for RRC NR resolution
MySQL
Memory barrier store buffer, invalid queue
程序人生 - 程序员三十五岁瓶颈你怎么看?
Xiaomi Interviewer: let's talk about the proficient Registration Center for three days and three nights
Yolov6's fast and accurate target detection framework is open source
YOLOv6又快又准的目标检测框架 已开源
随机推荐
Cloud-Native Database Systems at Alibaba: Opportunities and Challenges
一个人管理1000台服务器?这款自动化运维工具一定要掌握
Tar: /usr/local: cannot find tar in the Archive: due to the previous error, it will exit in the last error state
How torch.gather works
在线文本数字识别列表求和工具
The song of cactus -- throwing stones to ask the way (1)
数据库系统工程师对口专业有哪些?
面试官:用分库分表如何做到永不迁移数据和避免热点问题?
uview的安装和功能
Fast realization of Bluetooth communication between MCU and mobile phone
2022 cisp-pte (II) SQL injection
2022 CISP-PTE(二)SQL注入
正斜杠反斜杠的由来
postgreSQL在windows系统遇到权限否认(permission denied)
AHB2APB桥接器设计(2)——同步桥设计的介绍
tracepoint
如何优雅的写 Controller 层代码?
multiprocessing. Detailed explanation of pool
webscoket 数据库监听
Cloud-Native Database Systems at Alibaba: Opportunities and Challenges