摘要: package com.zipkey; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterx 阅读全文
posted @ 2024-04-16 16:42 数学与IT 阅读(2) 评论(0) 推荐(0) 编辑
摘要: -- INIT database CREATE TABLE msg ( msgId char(32) PRIMARY KEY, -- ulid uid bigint not null, con text not null ); create table seum( clientId int, uid 阅读全文
posted @ 2024-04-15 14:49 数学与IT 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicLong; import java.util.function.Function; public class SeqManager { private fi 阅读全文
posted @ 2024-04-05 11:50 数学与IT 阅读(3) 评论(0) 推荐(0) 编辑
摘要: import com.alibaba.fastjson.JSON; import com.juxiao.xchat.dao.room.dto.CallStatus; import com.juxiao.xchat.manager.cache.redis.RedissonManager; import 阅读全文
posted @ 2023-09-19 17:22 数学与IT 阅读(284) 评论(0) 推荐(0) 编辑
摘要: public static <P, T> List<CompletableFuture<T>> multiThreadRun(Function<P, T> run, Collection<P> list, int threadSize, Executor executor, boolean wait 阅读全文
posted @ 2023-08-30 18:04 数学与IT 阅读(76) 评论(0) 推荐(0) 编辑
摘要: /** * @param key 数值长度只能是 1 (操作string类型) 或者 2 (操作hash类型) 注意如果redis是分布式的,主key必须是第一个 * @param field 需要操作的 json field * @param val 任意字符 * @param limit 原来的 阅读全文
posted @ 2023-06-30 14:31 数学与IT 阅读(37) 评论(0) 推荐(0) 编辑
摘要: pom文件引入 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.15.1</version> </dependency> < 阅读全文
posted @ 2023-05-31 09:56 数学与IT 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 注意:本脚本只适用于数据量较少的集合进行排序,数据量太大会严重影响redis的性能。 local t = redis.call('hgetall', KEYS[1]); local arr = {}; for i, v in pairs(t) do if i % 2 == 0 then local 阅读全文
posted @ 2023-04-14 16:38 数学与IT 阅读(20) 评论(0) 推荐(0) 编辑
摘要: import com.alibaba.fastjson.JSON; import okhttp3.*; import java.io.IOException; import java.util.Map; import java.util.concurrent.TimeUnit; public cla 阅读全文
posted @ 2022-07-20 16:12 数学与IT 阅读(375) 评论(0) 推荐(0) 编辑
摘要: import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.LockSupport; import java.util.function.Supplier; public class Ca 阅读全文
posted @ 2022-06-05 19:38 数学与IT 阅读(54) 评论(0) 推荐(0) 编辑