摘要: @Slf4j public class TestLock { public static void main(String[] args) throws Exception{ ReentrantLock lock = new ReentrantLock(false); String mainThre 阅读全文
posted @ 2021-11-17 22:36 CodeCorner 阅读(231) 评论(0) 推荐(0)
摘要: 即使在可达性分析算法中不可达的对象,也并不是“非死不可”。 要宣告一个对象死亡,至少要经过两次标记过程:如果对象在进行可达性分析后发现没有与GC Roots相连接的引用链,那它将会被第一次标记并且进行一次筛选,筛选的条件是此对象是否有必要执行finalize()方法。当对象没有覆盖finalize( 阅读全文
posted @ 2021-08-29 18:26 CodeCorner 阅读(57) 评论(0) 推荐(0)
摘要: 接口A public interface InterfaceA { void print(); default void testMethod() { System.out.println("Print A"); } } 接口B public interface InterfaceB { void 阅读全文
posted @ 2021-08-29 11:38 CodeCorner 阅读(51) 评论(0) 推荐(0)
摘要: 1、数据什么时候放入缓存? 2、缓存过期时间设置,什么时候刷新缓存? 3、数据库数据又更新,缓存也及时更新吗? 4、缓存挂掉怎么办? 5、要刷新缓存的话,缓存中的数据正在被使用中......? 阅读全文
posted @ 2021-05-29 22:07 CodeCorner 阅读(42) 评论(0) 推荐(0)
摘要: package com.leetcode; /** * L-1021 * @author raymond * */ public class RemoveOuterParentheses { public static void main(String[] args) { String s1 = " 阅读全文
posted @ 2020-06-24 10:53 CodeCorner 阅读(176) 评论(0) 推荐(0)
摘要: package com.test; import java.util.HashMap; import java.util.Map; import org.apache.http.Consts; import org.apache.http.client.config.RequestConfig; i 阅读全文
posted @ 2020-06-19 14:29 CodeCorner 阅读(488) 评论(0) 推荐(0)
摘要: 1.4. Dependencies 1.4.1. Dependency Injection Dependency injection (DI) is a process whereby objects define their dependencies (that is, the other obj 阅读全文
posted @ 2020-06-09 15:56 CodeCorner 阅读(151) 评论(0) 推荐(0)
摘要: 1、The IoC Container 1.1. IoC Container and Beans IoC is also known as dependency injection (DI). It is a process whereby objects define their dependen 阅读全文
posted @ 2020-06-09 14:52 CodeCorner 阅读(161) 评论(0) 推荐(0)
摘要: -- 创建自增序列 CREATE SEQUENCE seq_interface_info INCREMENT BY 1 START WITH 1 --从1开始 NOMAXVALUE --不设最大值 NOCYCLE --不循环 NOCACHE; -- 创建表interface_info的触发器 CRE 阅读全文
posted @ 2020-05-25 14:21 CodeCorner 阅读(398) 评论(0) 推荐(0)
摘要: package thread; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; /** * @d 阅读全文
posted @ 2020-05-06 21:09 CodeCorner 阅读(507) 评论(0) 推荐(0)