ExecutorCompletionService: Efficient Task Result Handling in Concurrent Programming
Introduction
In concurrent programming, a common approach is to submit tasks to a thread pool and collect Future objects in a collection. After all tasks are submitted, we iterate through the Future collection, calling future.get() to retrieve each task's result. This method forces earlier submitted tasks to wait for completion, even if later s ...
Posted on Mon, 29 Jun 2026 16:45:00 +0000 by Vern1271
Java Thread Pool Architecture: Interfaces, Execution Flow, and Core Concepts
Thread Pool Overview
A thread pool manages a collection of worker threads that are reused to execute multiple tasks. Instead of creating new threads for each task, the thread pool reuses existing threads, reducing the overhead of thread creation and destruction.
Core Interfaces and Implementations
ExecutorService Interface
The ExecutorService i ...
Posted on Wed, 17 Jun 2026 18:11:35 +0000 by Cronje
MyBatis SQL Execution Pipeline: From SqlSession to Executor with Caching and Interceptor Support
MyBatis operates as a semi-automated ORM framework, decoupling SQL from Java code via XML or annotations. Its SQL execution follows a delegation chain: SqlSession.getMapper() produces a proxy, MapperProxy intercepts calls, MapperMethod translates them, and Executor handles database interaction, caching, and plugins.
This article dissects the ca ...
Posted on Sun, 07 Jun 2026 17:12:20 +0000 by rmbarnes82