当前位置:网站首页>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
边栏推荐
- Some settings about postfix completion code template in idea
- Memory barrier store buffer, invalid queue
- When there are multiple El select, the selected value is filtered by El select, and the last selected value is filtered by the second El select
- multiprocessing. Detailed explanation of pool
- OPPO面试整理,真正的八股文,狂虐面试官
- Winow10 installation nexus nexus-3.20.1-01
- 面试官:你天天用 Lombok,说说它什么原理?我竟然答不上来…
- Matlab GUI interface simulation DC motor and AC motor speed simulation
- extendible hashing
- 一个人管理1000台服务器?这款自动化运维工具一定要掌握
猜你喜欢

Interviewer: how to never migrate data and avoid hot issues by using sub database and sub table?
[email protected][2389:1: columnNameTypeOrConstraint : ( ( tableConstraint ) | ( columnNameT"/>NoViableAltException([email protected][2389:1: columnNameTypeOrConstraint : ( ( tableConstraint ) | ( columnNameT

使用 Blackbox Exporter 测试网络连通性

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

Solve the problem of win10 wsl2 IP change

(已解决) MINet 进行测试时报错如下 raise NotImplementedError

【软件工程】山东大学软件工程复习提纲

Oppo interview sorting, real eight part essay, abusing the interviewer
![[graduation season] graduation is the new beginning of your life journey. Are you ready](/img/4e/aa763455da974d9576a31568fc6625.jpg)
[graduation season] graduation is the new beginning of your life journey. Are you ready

快速实现Thread Mesh组网详解
随机推荐
Fast implementation of thread mesh networking
2022 CISP-PTE(一)文件包含
Bean拷贝详解
mssql如何使用语句导出并删除多表数据
Cloud-Native Database Systems at Alibaba: Opportunities and Challenges
One year's experience of technical personnel in Entrepreneurship
Date database date strings are converted to and from each other
View functions in tidb
Idea one click log generation
Talk about Domain Driven Design
Tidb database Quick Start Guide
Machine learning
guava 定时任务
获取地址url中的query参数指定参数方法
Instance tunnel use
高薪程序员&面试题精讲系列116之Redis缓存如何实现?怎么发现热key?缓存时可能存在哪些问题?
NoViableAltException([email protected][2389:1: columnNameTypeOrConstraint : ( ( tableConstraint ) | ( columnNameT
Partial function of Scala
Unsafe中的park和unpark
从5秒优化到1秒,系统飞起来了...