上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 97 下一页
摘要: 一、场景 执行多个线程,多个线程执行完后,再执行其他内容 二、过程 1、定义CountDownLatch对象,并设置数量 2、对象.countDown()方法,使数量减1 3、对象.await()方法,当数量值为0时,执行后续代码 三、案例 package com.wt.juc; import ja 阅读全文
posted @ 2025-05-31 18:00 市丸银 阅读(8) 评论(0) 推荐(0)
摘要: 一、区别 Runnable 1、返回值 2、处理异常 3、实现方法 二、FuturnTask 1、创建线程,需借助FuturnTask 2、获取返回值 FutrunTask对象.get() 三、案例 package com.wt.call; import java.util.concurrent.C 阅读全文
posted @ 2025-05-31 17:28 市丸银 阅读(11) 评论(0) 推荐(0)
摘要: 一、案例 package com.wt.lock; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class ThreadDemon02 { public 阅读全文
posted @ 2025-05-31 10:05 市丸银 阅读(7) 评论(0) 推荐(0)
摘要: Lock lock = new ReentrantLock(true); ture 效率比非公平锁低 阅读全文
posted @ 2025-05-31 09:55 市丸银 阅读(7) 评论(0) 推荐(0)
摘要: 一、lock package com.wt.lock; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class ThreadDemon01 { publ 阅读全文
posted @ 2025-05-31 09:54 市丸银 阅读(5) 评论(0) 推荐(0)
摘要: 解决方案 //List<String> list = new ArrayList<>(); List<String> list = new CopyOnWriteArrayList<>(); 阅读全文
posted @ 2025-05-30 19:51 市丸银 阅读(8) 评论(0) 推荐(0)
摘要: 一、过程 1、创建资源类,在资源类创建属性和方法 2、在资源类中操作方法 a、判断 b、干活 c、通知 3、创建多个线程,调用资源类的操作方法 4、防止虚假唤醒 二、同步 package com.wt.sync; /** * @Description: TODO * @Author: 1872428 阅读全文
posted @ 2025-05-30 18:26 市丸银 阅读(8) 评论(0) 推荐(0)
摘要: 1、collection a、分页 <collection property="roomGraphVoList" ofType="com.atguigu.lease.web.app.vo.graph.GraphVo" select="selectGraphVoByRoomId" column="ro 阅读全文
posted @ 2025-05-18 20:15 市丸银 阅读(8) 评论(0) 推荐(0)
摘要: 1、实现方法 @Async 2、启动类 @EnableAsync 阅读全文
posted @ 2025-05-18 15:38 市丸银 阅读(43) 评论(0) 推荐(0)
摘要: 1、模糊查询 contains('%',#{参数},'%') 2、大于小于 <if test="queryVo.minRent != null and queryVo.maxRent"> and (ri.rent &gt;= #{queryVo.minRent} and ri.rent &lt;= 阅读全文
posted @ 2025-05-17 20:56 市丸银 阅读(64) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 97 下一页