QuicKit is a lightweight Java toolkit that helps teams assemble concurrent and asynchronous workflows without rebuilding common infrastructure. The library wraps proven utilities such as Netty's hashed-wheel timer and Guava's retry support in focused helpers that are simple to adopt inside existing services.
- Parallel composition of lightweight tasks via
ParallelTaskwith either the common fork-join pool or a suppliedExecutorService. - Rate-limited task execution streams (
ExecutionFrequencyUtils) backed by a reusable hashed-wheel timer. - Configurable delayed task scheduling through
DelayQueueUtils.delay. - Resilient retry orchestration on top of
guava-retryingwith sensible defaults (RetryUtils). - Read/write cache warm-up flows with automatic lock upgrading through
ReadWriteLockWrapper. - Everyday helpers (
CommonUtils,DateUtil) for time, UUIDs, random codes, and domain parsing.
- Java 8 or newer (configured via Gradle toolchains).
- Gradle 8.x (the provided wrapper is recommended).
./gradlew clean buildThe command produces a consumable JAR under lib/build/libs/. You can reference it directly or publish to a private repository as needed.
ParallelTask.newTask()
.addTask(() -> inventoryService.refresh())
.addTask(() -> pricingService.recalculate())
.addTask(() -> cacheEvictor.run())
.execute();To run on a custom ExecutorService, pass it to execute(executor).
ExecutionFrequencyUtils.submitAsync(
"product-sync",
tasks,
20 // fallback throughput when no config override is supplied
);The helper partitions the workload, honours optional limit and stop flags retrieved via ConfigUtil, and uses the hashed-wheel timer to phase out execution over time.
DelayQueueUtils.delay(() -> notificationSender.send(orderId), 5L);The task is scheduled once after the specified number of seconds.
String confirmation = RetryUtils.retryCall(
"confirm-order",
result -> result == null,
3,
() -> orderGateway.confirm(orderId),
"PENDING"
);RetryUtils automatically honours configuration overrides exposed via ConfigUtil.
ReadWriteLockWrapper<List<String>> wrapper = ReadWriteLockWrapper.newLock();
List<String> items = wrapper.execute(
this::loadFromRemote,
this::loadFromCache,
list -> list != null && !list.isEmpty()
);The wrapper keeps cache refresh logic compact while preventing redundant remote calls under concurrent access.
ConfigUtil currently provides stubbed getters that return supplied defaults. Integrate it with your configuration system (Apollo, Spring Config, etc.) to control runtime behaviour such as retry counts or per-task throughput throttles without code changes.
lib/β Gradle module containing the core sources, utilities, and tests.work/β scratch directory used by certain performance tests.
./gradlew testSome performance-focused tests rely on the ContiPerf JUnit rule. They can generate HTML reports under lib/build/reports/ when a JDK is available.
QuicKit is licensed under the terms of the Apache License 2.0.