代码改变世界

阅读排行榜

CopyOnWriteArrayList与Collections.synchronizedList的性能对比

2018-12-11 13:53 by GarfieldEr007, 288 阅读, 收藏,
摘要: 列表实现有ArrayList、Vector、CopyOnWriteArrayList、Collections.synchronizedList(list)四种方式。 1 ArrayList ArrayList是非线性安全,此类的 iterator 和 listIterator 方法返回的迭代器是快速 阅读全文

log4j.xml的实用例子

2017-06-18 22:42 by GarfieldEr007, 287 阅读, 收藏,
摘要: 大多数讲log4j配置的教程用的都是log4j.properties文件,我觉得xml或许更好一点,在这里我提供一个我已经用于生产环境的log4j.xml的例子,先上代码,然后再解释: log4j简单地说,由3个东西组成: 一个叫“logger”,是我们的程序直接使用的东西,log4j高明之处就在于 阅读全文

量化Hacker News 中50天的数据 Quantifying Hacker News with 50 days of data

2016-04-11 12:56 by GarfieldEr007, 286 阅读, 收藏,
摘要: Quantifying Hacker News I thought it would be fun to analyze the activity on one of my favorite sources of interesting links and information, Hacker N 阅读全文

Java提高篇——通过分析 JDK 源代码研究 Hash 存储机制

2017-07-16 22:44 by GarfieldEr007, 284 阅读, 收藏,
摘要: 阅读目录 通过 HashMap、HashSet 的源代码分析其 Hash 存储机制HashMap 的存储实现Hash 算法的性能选项HashMap 的读取实现HashSet 的实现 阅读目录 通过 HashMap、HashSet 的源代码分析其 Hash 存储机制HashMap 的存储实现Hash 阅读全文

Java SPI机制

2018-12-31 12:28 by GarfieldEr007, 283 阅读, 收藏,
摘要: 最近在一个日志标准化的项目中,使用了责任链模式来链接每一个具体的处理Handler.但是在实例化时,需要每一个都去创建实例。如: 这种,涉及了具体的实现类,就违反了可拔插的原则,如果需要替换一种实现,就需要修改代码。老大看到我的代码,直接让用Java spi机制去做。 1. SPI机制简介 Serv 阅读全文
上一页 1 ··· 178 179 180 181 182 183 184 185 186 ··· 222 下一页