当前位置:网站首页>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
边栏推荐
- C# 请问怎么在更新数据库时候调用line与rows
- Cloud-Native Database Systems at Alibaba: Opportunities and Challenges
- Overview of database schema in tidb
- Rust Async: smol源码分析-Executor篇
- hutool对称加密
- AHB2APB桥接器设计(2)——同步桥设计的介绍
- volatile 和 synchronized 到底啥区别?
- uview的安装和功能
- How torch.gather works
- Easyexcel: read Excel data into the list set
猜你喜欢

The interviewer of a large front-line factory asked: do you really understand e-commerce order development?

IDEA连接数据库报错

2022 le fichier CISP - Pte (i) contient:

Win10 remote connection to ECS

mssql如何使用语句导出并删除多表数据

【编译原理】山东大学编译原理复习提纲

快速实现Thread Mesh组网详解

Classical cryptosystem -- substitution and replacement

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

【OpenAirInterface5g】RRC NR解析之RrcSetupComplete
随机推荐
技术人员创业一年心得
用XGBoost迭代读取数据集
正斜杠反斜杠的由来
数据库系统工程师对口专业有哪些?
OPPO面试整理,真正的八股文,狂虐面试官
HTAP in depth exploration Guide
2022 le fichier CISP - Pte (i) contient:
仙人掌之歌——投石问路(1)
The song of cactus -- throwing stones to ask the way (1)
Cloud-Native Database Systems at Alibaba: Opportunities and Challenges
【Kevin三连弹之三】Rust真的比C慢吗?进一步分析queen微测评
[openairinterface5g] rrcsetupcomplete for RRC NR resolution
Machine learning
NoViableAltException([email protected][2389:1: columnNameTypeOrConstraint : ( ( tableConstraint ) | ( columnNameT
How to download opencv? How to configure opencv after downloading?
HTAP Quick Start Guide
One year's experience of technical personnel in Entrepreneurship
Talk about Domain Driven Design
Idea one click log generation
thrift