上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: package com.study.hc.net.nio; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.nio.channels.Serv 阅读全文
posted @ 2022-05-22 21:33 yydssc 阅读(122) 评论(0) 推荐(0)
摘要: /* * Copyright 2012 The Netty Project * * The Netty Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may 阅读全文
posted @ 2022-05-22 21:27 yydssc 阅读(90) 评论(0) 推荐(0)
摘要: package com.study.hc.net.netty.demo; // 链表形式调用 netty就是类似的这种形式 public class PipelineDemo { /** * 初始化的时候造一个head,作为责任链的开始,但是并没有具体的处理 */ public HandlerCha 阅读全文
posted @ 2022-05-22 21:23 yydssc 阅读(50) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-04-05 20:50 yydssc 阅读(27) 评论(0) 推荐(0)
摘要: public class CounterUnsafe { volatile int i = 0; private static Unsafe unsafe = null; //i字段的偏移量 private static long valueOffset; static { //unsafe = U 阅读全文
posted @ 2022-04-05 11:46 yydssc 阅读(100) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-04-05 11:44 yydssc 阅读(49) 评论(0) 推荐(0)
摘要: import java.util.List;import java.util.concurrent.LinkedBlockingQueue;import java.util.concurrent.RejectedExecutionHandler;import java.util.concurrent 阅读全文
posted @ 2022-04-04 11:27 yydssc 阅读(143) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-04-04 11:25 yydssc 阅读(19) 评论(0) 推荐(0)
摘要: /** 线程封闭示例 */public class Demo5 { /** threadLocal变量,每个线程都有一个副本,互不干扰 */ public static ThreadLocal<String> value = new ThreadLocal<>(); /** * threadloca 阅读全文
posted @ 2022-04-04 10:32 yydssc 阅读(33) 评论(0) 推荐(0)
摘要: /** * 示例- 线程stop强制性中止,破坏线程安全的示例 */public class Demo3 { public static void main(String[] args) throws InterruptedException { StopThread thread = new St 阅读全文
posted @ 2022-03-27 21:22 yydssc 阅读(30) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页