前言:代码简洁与性能高效无法两全其美,本文章专注于大并发程序的性能,如果您追求代码简洁,本文章可能不太适合,因为本文章主要讨论如何写出在高并发下也能运行很好的代码. 并文章属于Java并发编程实战中例子.但结合实际场景进行了阐述. 通常,我们如果写一个单实例模式的对象,一般会这样写: 写法一: public class Singleton { private static final Singleton instance = new Singleton(); /** * 防止其他人new对象 *…
Oracle单实例情况下的library cache pin的问题模拟与问题分析 參考自: WAITEVENT: "library cache pin" Reference Note (文档 ID 34579.1) How to Find the Blocker of the 'library cache pin' in a RAC environment? (文档 ID 780514.1) 本机环境:Oracle 10.2.0.5 x86-64bit for RHEL5.8 x86-…