T
- Type of Node/Task IDR
- Type of Node/Task resultpublic class DexecutorConfig<T,R> extends Object
Configuration Object for Dexecutor framework. At a minimum it needs ExecutorService
and TaskProvider
, rest are optional and takes default values
This provides way to hook in your own DexecutorState
and Validator
Constructor and Description |
---|
DexecutorConfig(DexecutorState<T,R> dexecutorState,
ExecutionEngine<T,R> executionEngine,
TaskProvider<T,R> taskProvider) |
DexecutorConfig(ExecutionEngine<T,R> executionEngine,
TaskProvider<T,R> taskProvider)
Construct the object with mandatory params, rest are optional
|
DexecutorConfig(ExecutorService executorService,
TaskProvider<T,R> taskProvider)
Construct the object with mandatory params, rest are optional
|
DexecutorConfig(ExecutorService executorService,
TaskProvider<T,R> taskProvider,
ExecutionListener<T,R> listener) |
Modifier and Type | Method and Description |
---|---|
DexecutorState<T,R> |
getDexecutorState() |
int |
getImmediateRetryPoolThreadsCount() |
int |
getScheduledRetryPoolThreadsCount() |
void |
setDexecutorState(DexecutorState<T,R> dexecutorState) |
void |
setExecutionListener(ExecutionListener<T,R> listener) |
void |
setImmediateRetryPoolThreadsCount(int immediateRetryPoolThreadsCount)
sets the immediate retry thread pool size to that of specified
|
void |
setScheduledRetryPoolThreadsCount(int scheduledRetryPoolThreadsCount)
sets the scheduled thread pool size to that of specified
|
void |
setValidator(Validator<T,R> validator)
change the validator to that of specified
|
public DexecutorConfig(ExecutorService executorService, TaskProvider<T,R> taskProvider)
executorService
- provided executor servicetaskProvider
- provided task providerpublic DexecutorConfig(ExecutorService executorService, TaskProvider<T,R> taskProvider, ExecutionListener<T,R> listener)
public DexecutorConfig(ExecutionEngine<T,R> executionEngine, TaskProvider<T,R> taskProvider)
executionEngine
- provided execution EnginetaskProvider
- provided task providerpublic DexecutorConfig(DexecutorState<T,R> dexecutorState, ExecutionEngine<T,R> executionEngine, TaskProvider<T,R> taskProvider)
public void setValidator(Validator<T,R> validator)
validator
- the validatorpublic int getImmediateRetryPoolThreadsCount()
public void setImmediateRetryPoolThreadsCount(int immediateRetryPoolThreadsCount)
immediateRetryPoolThreadsCount
- Number of threads that should process retry immediatelypublic int getScheduledRetryPoolThreadsCount()
public void setScheduledRetryPoolThreadsCount(int scheduledRetryPoolThreadsCount)
scheduledRetryPoolThreadsCount
- Number of threads that should process retry immediatelypublic DexecutorState<T,R> getDexecutorState()
public void setDexecutorState(DexecutorState<T,R> dexecutorState)
dexecutorState
- to set topublic void setExecutionListener(ExecutionListener<T,R> listener)
Copyright © 2016–2018 Dexecutor. All rights reserved.