上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 97 下一页
摘要: 一、安装 1、官网:https://nacos.io/zh-cn/docs/quick-start.html?spm=7145af80.3bfb50d8.0.0.74e42fa5c2g2WH 2、下载、解压 3、启动(windows) startup.cmd -m standalone 4、检验 h 阅读全文
posted @ 2025-06-05 21:16 市丸银 阅读(4) 评论(0) 推荐(0)
摘要: 一、官网 https://sca.aliyun.com/docs/2023/overview/what-is-sca/ 二、知识点 微服务:SpringBoot 注册中心/配置中心:Spring Cloud Alibaba Nacos 网关:Spring Cloud Gateway 远程调用:Spr 阅读全文
posted @ 2025-06-04 21:21 市丸银 阅读(7) 评论(0) 推荐(0)
摘要: 案例 package com.wt.forkjoin; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinTask; import java.util.concurrent.RecursiveT 阅读全文
posted @ 2025-06-02 17:13 市丸银 阅读(3) 评论(0) 推荐(0)
摘要: 一、七个参数 int corePoolSize, // 常驻线程数量(核心) int maximumPoolSize, // 最大线程数量 long keepAliveTime, // 线程存活时间 TimeUnit unit, // 线程存活单位 BlockingQueue<Runnable> w 阅读全文
posted @ 2025-06-02 16:00 市丸银 阅读(7) 评论(0) 推荐(0)
摘要: 一、一池N线程 ExecutorService pool = Executors.newFixedThreadPool(5); 二、一池一个线程 ExecutorService pool = Executors.newSingleThreadExecutor(); 三、一池可变线程,遇强则强 Exe 阅读全文
posted @ 2025-06-02 14:45 市丸银 阅读(3) 评论(0) 推荐(0)
摘要: 一、用法 方法类型 异常抛出 特殊值 阻塞 超时 插入 add(e) offer(e) put(e) offer(e,time,unit) 移除 remove() poll() take() poll(time,unit) 检查 element() peek() 不可用 不可用 二、案例 packa 阅读全文
posted @ 2025-06-02 14:11 市丸银 阅读(6) 评论(0) 推荐(0)
摘要: 一、注意 写锁可以降级为读锁,读锁不能升级为写锁 二、过程 1、写锁 2、读锁 3、释放写锁 4、释放读锁 三、案例 package com.wt.readwrite; import java.util.concurrent.locks.ReentrantReadWriteLock; /** * @ 阅读全文
posted @ 2025-06-02 10:55 市丸银 阅读(15) 评论(0) 推荐(0)
摘要: 一、语法 private ReadWriteLock rwLock = new ReentrantReadWriteLock(); // 上锁 rwLock.writeLock().lock(); // 释放锁 rwLock.writeLock().unlock(); 二、案例 存入、读取 map数 阅读全文
posted @ 2025-06-02 10:10 市丸银 阅读(4) 评论(0) 推荐(0)
摘要: 一、作用 抢占资源 二、过程 1、生命对象,并设置数量 2、获得资源 3、释放资源 三、案例,强车位 package com.wt.juc; import java.util.Random; import java.util.concurrent.Semaphore; import java.uti 阅读全文
posted @ 2025-05-31 21:22 市丸银 阅读(7) 评论(0) 推荐(0)
摘要: 一、用法 当数量达到 定义的值,执行CyclicBarrier里面的内容 二、语法 1、定义对象 CyclicBarrier cyclicBarrier = new CyclicBarrier(NEED_NUM, Runnable); 2、在线程中使用await()方法 三、案例 package c 阅读全文
posted @ 2025-05-31 20:54 市丸银 阅读(8) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 97 下一页