Custom Thread pool implementation in Java.