| Package | Description |
|---|---|
| com.github.lpezet.java.patterns.worker |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractSPMWorker<W,R> |
class |
AsyncWorker<W,R> |
class |
ChainWorker<W,R,S>
Basically:
pLeft.peform(pRight.perform(pWork:W)):R
|
class |
CircuitBreakerWorker<W,R> |
class |
RetryWorker<W,R> |
class |
SimpleSPMWorker<W,R>
Simple Split, Process, Merge worker using a single implementation.
|
class |
SupervisorWorker<W,R> |
| Modifier and Type | Method and Description |
|---|---|
static <S extends IWorker<W,R>,W,R> |
Workers.circuitBreaker(S pSource,
ICircuitBreakerStrategy pStrategy) |
static <S extends IWorker<W,R>,W,R> |
Workers.decorate(IWorker<W,R> pWrapper,
S pSource) |
static <S extends IWorker<W,R>,W,R> |
Workers.retry(S pSource,
IRetryStrategy pRetryStrategy) |
static <S extends IWorker<W,R>,W,R> |
Workers.supervise(S pSource,
long pTimeout,
TimeUnit pUnit) |
| Modifier and Type | Method and Description |
|---|---|
IWorker<W,R> |
ChainBuilder.getChain() |
IWorker<S,R> |
ChainWorker.getLeft() |
IWorker<W,S> |
ChainWorker.getRight() |
| Modifier and Type | Method and Description |
|---|---|
<R2> ChainBuilder<W,R2> |
ChainBuilder.chain(IWorker<R,R2> pNextWorker) |
static <S extends IWorker<W,R>,W,R> |
Workers.decorate(IWorker<W,R> pWrapper,
S pSource) |
static <W,R> ChainBuilder<W,R> |
ChainBuilder.newBuilder(IWorker<W,R> pWorker) |
| Constructor and Description |
|---|
AsyncResult(ExecutorService pExecutorService,
IWorker<T,R> pImpl,
T pWork)
Executes command with custom callable.
|
AsyncWorker(ExecutorService pExecutorService,
IWorker<W,R> pImpl) |
ChainWorker(IWorker<S,R> pLeft,
IWorker<W,S> pRight) |
ChainWorker(IWorker<S,R> pLeft,
IWorker<W,S> pRight) |
CircuitBreakerWorker(IWorker<W,R> pImpl,
ICircuitBreakerStrategy pCircuitBreakerStrategy) |
RetryWorker(IWorker<W,R> pImpl,
IRetryStrategy pRetryStrategy) |
SimpleSPMWorker(ExecutorService pExecutorService,
IWorkSplitter<W> pSplitter,
IResultMerger<R> pMerger,
IWorker<W,R> pImpl) |
SupervisorWorker(IWorker<W,R> pImpl,
ExecutorService pExecutorService,
long pTimeout,
TimeUnit pTimeoutUnit) |
SupervisorWorker(IWorker<W,R> pImpl,
long pTimeout,
TimeUnit pTimeoutUnit) |
lpezet