Off Heap Cache - OHCache - Simple Example
Reference https://github.com/snazy/ohc https://docs.oracle.com/javase/8/docs/api/java/nio/MappedByteBuffer.html https://github.com/shooeugenesea/study-pra...
Reference https://github.com/snazy/ohc https://docs.oracle.com/javase/8/docs/api/java/nio/MappedByteBuffer.html https://github.com/shooeugenesea/study-pra...
Reference ForkJoinPoolManyThreadMain.java ForkJoinPool Paper ForkJoinPool - Error Handling Question 原本以為 new ForkJoinPool(2) 像這樣的宣告, 是讓 ForkJoinPool 最多維...
Reference Git: ForkJoinPoolErrorMain.java 前篇: ForkJoinPool - Workstealing Next: ForkJoinPool - Thread Management Error Handling 如果 fork 出去...
Reference https://en.wikipedia.org/wiki/Work_stealing 前篇: Java Concurrency - ForkJoinPool 的 deadlock 下篇: ForkJoinPool - Error Handling Introduction Fork...
Reference 前篇 Java Concurrent - ForkJoinPool 下篇 ForkJoinPool - Work stealing Will ForkJoinTask encounter deadlock problem? 在看 ForkJoinTask 的時候, ...
ExecutorService and Problem 用一個 ExecutorService submit task 後, 如果 task 會 submit 其他的 task, 這些 task 都會放進 ExecutorService 的 queue 中. 這樣就沒辦法做到 "第一個 task 與其產生的...
Introduction CyclicBarrier 很久沒用都忘了, 來複習一下.. Description 簡單說就是很多個 thread 去作事情, 作完之後就 await. CyclicBarrier 等作完的 thread 達到指定的個數後, await 就結束. Code public ...
Introduction 今天才知道 Java 7 有提供一個 Phaser class 來處理更複雜的 CountDownLatch 需求. Simple Phaser 想用 Phaser, 首先你的 threads 工作要有分階段, 一個階段沒做完就不能進行下個階段. 有了這個限制後就可以照下面的流程...
In a project, I need zip file and append to separated folders.<div> public static void main(String[] params) throws IOException { List<String>...
Introduction After a performance issue happen, we have less information about system status at that time. There is flush log in Cassandra, so I write code ...
Reference lombok - Builder orika - Advanced Mapping Configurations Effective Java - Builder Pattern Introduction Builder Pattern is suggested in Ef...
Reference Dealing with InterruptedException How to handle InterruptedException Throw it directly If you can't throw it, call Thread.currentThread().in...
Introduction 記錄 Java 使用 SSL 的方法 (不要求 client auth) Reference https://github.com/shooeugenesea/study-practice/tree/ssl-practice http://www.programgo.com/a...
Reference Guava User Guide Practice in Github Optional Optional 可以用來處理 null value 與避免 NullPointerException public class OptionalTest {
如果沒有指定要丟的參數名稱, python 就會照順序排. 如果順序對不起來就會 error.
帶入 dict 的值, 如果用 format api, dictionary 要帶 ** 去展開 key-value >>> m = {'a':1.1234, "b":"qq"} >>> '%(a)1.1f %(a)s %(b)s' %m '1.1 1.1234 qq'
tuple 就是不可變的 list.
python 的 function 是一個物件, 所以可以放進 collection 中等以後被呼叫. >>> def a(): print 'a';
I use Notepad++ to check log and debug. When log file is large, I need to split large file to smaller ones. I can't find tool so write codes to split file ...
cd /d %~dp0不管執行 script 時候路徑在哪, cd /d %~dp0 後 script 的路徑就到該 script 路徑下 script, 放在 f:/test/test.bat cd /d %~dp0 dir execute: f:/test/test.bat f:\>test\te...