redission
kong-kong
记录流水账
展开
-
Redisson中expire用法
# key在Redis中不存在情况下RList list2 = redissonClient.getList("myExpiredKey2");list2.expire(3, TimeUnit.MINUTES); //失效list2.add("two");RList list3 = redissonClient.getList("myExpiredKey3");list3.add("three");list3.expire(3, TimeUnit.MINUTES); //有效...原创 2020-05-14 19:06:19 · 8653 阅读 · 2 评论 -
redis key有冒号(:) 双引号 通过redis-client
hget 7193278945204828bd306e5d43154ca4:workflow:node "\"782C7004788A4B8F9480240AA180027C:2\""hget "7193278945204828bd306e5d43154ca4:workflow:node" "\"782C7004788A4B8F9480240AA180027C:2\""...原创 2020-05-07 17:43:00 · 5712 阅读 · 0 评论 -
命令
Redis命令 Redisson对象方法 AUTH Config.setPassword(); APPEND RBinaryStream.getOutputStream().write() BITCOUNT RBitSet.cardinality(), RBitSet.cardinalityAsync(), RBitSetReactive.cardinal...转载 2020-04-01 16:59:56 · 1129 阅读 · 0 评论 -
RedissonList 原理
list 相关命令rpush mylist 1 2 3 4 5 6 7 8 9 10lrange mylist 0 -1# 第一个位置index=0 结果集=3 4 5 6 7 8 9 10ltrim mylist 2 9# count是删除匹配的几个lrem key count elementadd 默认是 rpushlist:key valu...原创 2020-03-31 18:43:17 · 1135 阅读 · 0 评论 -
RedissonMap原理
RMap<String, String> map = redissonClient.getMap("userRegisterMap");putIfAbsentAsync只有不存在的时候,才设置,存在filed,则返回该field的值put返回旧值,设置新值...原创 2020-03-31 16:57:41 · 2418 阅读 · 0 评论 -
redis lua 脚本
# 语法EVAL script numkeys key [key ...] arg [arg ...]# 示例eval "return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}" 2 name age king 18# 没有参数 set foo bareval "return redis.call('set','foo','bar')...原创 2020-03-30 17:57:11 · 299 阅读 · 0 评论 -
redisson-spring-boot-starter 支持 springboot1
https://github.com/redisson/redisson/tree/master/redisson-spring-boot-starter#spring-boot-starter由于最新版的redisson-spring-boot-starter支持2.2.x,看下图,如果历史项目中是springboot1,那就需要调整下redisson-spring-data,否则不支持...原创 2020-03-31 10:01:01 · 3703 阅读 · 0 评论 -
redisson 相关网址
https://github.com/redisson/redisson/wiki/Table-of-Contenthttps://github.com/redisson/redisson/tree/master/redisson-spring-boot-starter#spring-boot-starterhttps://github.com/redisson/redisson/w...原创 2020-03-31 09:00:24 · 308 阅读 · 0 评论 -
RedissonLock原理
lock# KEYS[1] lock:key 分布式锁的key# ARGV[1] 失效时间 默认30000ms# ARGV[2] 当前RedissonLock的id(uuid)+":"+threadId<T> RFuture<T> tryLockInnerAsync(long leaseTime, TimeUnit unit, long thread...原创 2020-03-28 16:03:41 · 1246 阅读 · 0 评论 -
redission 分布式锁
Distributed locks and synchronizersNikita Koksharov edited this pageon 18 Jan·50 revisions8.1. LockRedis based distributed reentrantLockobject for Java and implementsjava.util.concurrent.l...转载 2020-03-25 17:31:21 · 639 阅读 · 0 评论