T
- Type of Node/Task IDR
- Type of Node/Task resultpublic class DexecutorConfig<T extends Comparable<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(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
|
Modifier and Type | Method and Description |
---|---|
DexecutorState<T,R> |
getDexecutorState() |
int |
getImmediateRetryPoolThreadsCount() |
int |
getScheduledRetryPoolThreadsCount() |
void |
setDexecutorState(DexecutorState<T,R> dexecutorState) |
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(ExecutionEngine<T,R> executionEngine, TaskProvider<T,R> taskProvider)
executionEngine
- provided execution EnginetaskProvider
- provided task providerpublic 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 toCopyright © 2016 Dexecutor. All rights reserved.