![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
jentropy
这个作者很懒,什么都没留下…
展开
-
一致性哈希算法
白话解析:一致性哈希算法 consistent hashing转载 2020-09-16 11:20:01 · 105 阅读 · 0 评论 -
ThreadPoolExecutor 线程池的简单使用
线程池使用// 初始化一个线程池 ExecutorService threadPool = new ThreadPoolExecutor(10, 30, 3, TimeUnit.MINUTES, new LinkedBlockingQueue<>(100));// 使用 threadPool.submit( () -> { // 执行内容 }ThreadPoolExecutor 参数对应参数 (依次)1、corePoolSize:核心线程数核心线程会一直存活,即使没有原创 2020-09-09 16:09:16 · 497 阅读 · 0 评论 -
短信验证码使用guava做缓存
guava 使用guava使用教程1.初始化 一个存储 短信验证码的缓存@Configuration@Slf4jpublic class CacheConfig { @Bean("smsCache") public Cache<String, String> cache(){ return CacheBuilder.newBuilder() //设置并发级别为8,并发级别是指可以同时写缓存的线程数原创 2020-09-08 11:51:36 · 549 阅读 · 0 评论