上一页 1 2 3 4 5 6 7 8 9 10 ··· 26 下一页
摘要: ConcurrentHashMap是对HashMap的高并发实现 压力测试方法: /* * boolean retrieve : 是否获取,true获取和插入,false只插入 */ public static void pressureTest(final Map<String, Integer> 阅读全文
posted @ 2020-09-30 11:43 龙宇在天 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1.ArrayBlockingQueue 有边界2.PriorityBlockingQueue 无边界3.LinkedBlockingQueue 边界可有可无4.SynchronousQueue 新增一个元素,等待删除一个元素才会继续删除,容量大小为05.DelayQueue 延迟处理6.Linke 阅读全文
posted @ 2020-09-28 09:00 龙宇在天 阅读(131) 评论(0) 推荐(0) 编辑
摘要: /* * ArrayList:随机遍历比顺序遍历的效率高,因为它实现了RandomAccess接口 * LinkedList:顺序遍历比随机遍历的效率高,因为它没有实现RandomAccess接口 */ java.util.List<String> list = new ArrayList<>(); 阅读全文
posted @ 2020-08-31 14:22 龙宇在天 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 初识CompletableFuture package com.dwz.executors; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.CompletableFut 阅读全文
posted @ 2020-08-26 16:20 龙宇在天 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 使用CompletionService解决耗时时间过长任务导致的阻塞问题 package com.dwz.executors; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callabl 阅读全文
posted @ 2020-08-14 17:03 龙宇在天 阅读(1057) 评论(0) 推荐(0) 编辑
摘要: 定时任务的四种形式: 1.无返回值,入参Runnable private static void testScheduledFutureRunnable() { ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecuto 阅读全文
posted @ 2020-08-14 14:38 龙宇在天 阅读(698) 评论(0) 推荐(0) 编辑
摘要: future的缺陷 package com.dwz.executors; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.Callable; 阅读全文
posted @ 2020-08-11 16:34 龙宇在天 阅读(483) 评论(0) 推荐(0) 编辑
摘要: future.get()和Future.get(long timeout, TimeUnit unit) package com.dwz.executors; import java.util.concurrent.ExecutionException; import java.util.concu 阅读全文
posted @ 2020-08-10 17:33 龙宇在天 阅读(1371) 评论(0) 推荐(0) 编辑
摘要: ExecutorService的终止方法 package com.dwz.executors; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.c 阅读全文
posted @ 2020-08-10 11:34 龙宇在天 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 定时任务 scheduler solution 1.Timer/TimerTask 2.SchedulerExecutorServic3.crontab 4.cron4j 5.quartz 6.Control-M(商业版的) Timer问题: 当TimerTask的执行时间超过Timer规定的任务间 阅读全文
posted @ 2020-08-06 10:08 龙宇在天 阅读(305) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 26 下一页
//右侧添加目录 //增加页面点击显示24字社会主义核心价值观