当前位置:网站首页>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
边栏推荐
- 2022 CISP-PTE(一)文件包含
- winow10安装Nexus nexus-3.20.1-01
- MPC control of aircraft wingtip acceleration and control surface
- 聊聊领域驱动设计
- 内存屏障今生之Store Buffer, Invalid Queue
- [graduation season] graduation is the new beginning of your life journey. Are you ready
- 进程终止(你真的学会递归了吗?考验你的递归基础)
- 【编译原理】山东大学编译原理复习提纲
- Bean拷贝详解
- Tidb basic functions
猜你喜欢

2022 le fichier CISP - Pte (i) contient:

Process termination (have you really learned recursion? Test your recursion Foundation)

OpenCV怎么下载?OpenCV下载后怎么配置?

Configuring FTP, enterprise official website, database and other methods for ECS

Quick realization of Bluetooth ibeacn function

Currying Scala functions

【毕业季】毕业是人生旅途的新开始,你准备好了吗

Solve the problem of win10 wsl2 IP change

The fourth question of the 299th weekly match 6103 Minimum fraction of edges removed from the tree

Coggle 30 Days of ML 7月竞赛学习
随机推荐
uview的安装和功能
请问如何将数据从oracle导入fastDFS?
小米面试官:听你说精通注册中心,我们来聊 3 天 3 夜
Centos7.9 install MySQL 5.7 and set startup
2022 cisp-pte (II) SQL injection
One year's experience of technical personnel in Entrepreneurship
mssql如何使用语句导出并删除多表数据
Visual Studio VS 快捷键使用大全
【毕业季】毕业是人生旅途的新开始,你准备好了吗
thrift
【OpenAirInterface5g】RRC NR解析之RrcSetupComplete
Coggle 30 Days of ML 7月竞赛学习
[leetcode] day90 the element with the smallest K in the binary search tree
vs怎么配置OpenCV?2022vs配置OpenCV详解(多图)
pytorch Default process group is not initialized
poi导出excle
Unsafe中的park和unpark
An Empirical Evaluation of In-Memory Multi-Version Concurrency Control
Machine learning
Date database date strings are converted to and from each other