Recent Posts

Spring Integration - Transformations

Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enc...

Spring Integration - Channels

Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enco...

RabbitMQ Example

Reference https://www.rabbitmq.com/install-windows.html  https://www.rabbitmq.com/tutorials/tutorial-one-java.html https://github.com/shooeugenesea/...

Google Protobuf - Basic Example

Reference Protobuf - Java Code in Github Example Install protobuf Download from Git: https://github.com/protocolbuffers/protobuf Install protobuf ...

Spring Integration - Basic Terms

Reference Spring Integration Basic Terms 後篇: https://www.isaacnote.com/2018/10/spring-integration-channels.html  Terms org.springframework.inte...

ForkJoinPool - Thread Management

Reference ForkJoinPoolManyThreadMain.java ForkJoinPool Paper ForkJoinPool - Error Handling Question 原本以為 new ForkJoinPool(2) 像這樣的宣告, 是讓 ForkJoinPool 最多維...

ForkJoinPool - Error Handling

Reference Git: ForkJoinPoolErrorMain.java 前篇: ForkJoinPool - Workstealing Next: ForkJoinPool - Thread Management Error Handling 如果 fork 出去...

ForkJoinPool - Work stealing

Reference https://en.wikipedia.org/wiki/Work_stealing 前篇: Java Concurrency - ForkJoinPool 的 deadlock 下篇: ForkJoinPool - Error Handling Introduction Fork...

Java Concurrent - ForkJoinPool

ExecutorService and Problem 用一個 ExecutorService submit task 後, 如果 task 會 submit 其他的 task, 這些 task 都會放進 ExecutorService 的 queue 中. 這樣就沒辦法做到 "第一個 task 與其產生的...

Java Concurrent CyclicBarrier

Introduction CyclicBarrier 很久沒用都忘了, 來複習一下.. Description 簡單說就是很多個 thread 去作事情, 作完之後就 await. CyclicBarrier 等作完的 thread 達到指定的個數後, await 就結束. Code public ...

Java Concurrent Phaser

Introduction 今天才知道 Java 7 有提供一個 Phaser class 來處理更複雜的 CountDownLatch 需求. Simple Phaser 想用 Phaser, 首先你的 threads 工作要有分階段, 一個階段沒做完就不能進行下個階段. 有了這個限制後就可以照下面的流程...

Zip files

In a project, I need zip file and append to separated folders.<div> public static void main(String[] params) throws IOException { List<String>...

lombok + Orika + Builder Pattern

Reference lombok - Builder orika - Advanced Mapping Configurations Effective Java - Builder Pattern Introduction Builder Pattern is suggested in Ef...

Handle InterruptedException

Reference Dealing with InterruptedException How to handle InterruptedException Throw it directly If you can't throw it, call Thread.currentThread().in...

Java TLS Practice

Introduction 記錄 Java 使用 SSL 的方法 (不要求 client auth) Reference https://github.com/shooeugenesea/study-practice/tree/ssl-practice http://www.programgo.com/a...