Skip to content

Introduce Worker.Factory

Compare
Choose a tag to compare
@halakaraki halakaraki released this 06 Aug 22:12
· 454 commits to master since this release
95896f2

Introduce Worker.Factory for worker creation and lifecycle control.

Worker start and shutdown methods are made private

Sample for worker creation:

Worker.Factory factory = new Worker.Factory("domain");

Worker worker1 = factory.newWorker("tasklist1");
Worker worker2 = factory.newWorker("tasklist2");

// Starts all workers created by factory
factory.start();

// Shuts down all workers created by factory
factory.shutdown(Duration.ofMillis(1));