public class ExecutorConfigurationProperties extends Object
From each of the executor configurations,
a ThreadPoolTaskExecutor will be created. The default executor is the fallback
for any task not specifically configured to an executor.
A system is a group of tasks, assumed to belong to a single system, for example a backend system. Both a system and a call can be assigned to an executor, where the task configuration takes precedence.
Note that any task not specifically assigned to an executor will default to the global default executor.
| Constructor and Description |
|---|
ExecutorConfigurationProperties() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutor(ExecutorProperties executor)
Convenience method to add properties for a single executor.
|
void |
addSystem(SystemProperties system)
Convenience method to add properties for a single system.
|
Integer |
getAsyncTimeoutExecutorPoolSize()
Getter for the async task timeout executor pool size.
|
String |
getDefaultExecutor()
Getter for the default executor.
|
Integer |
getDefaultTimeout()
Getter for default timeout.
|
List<ExecutorProperties> |
getExecutors()
Getter for the executors.
|
SystemProperties |
getSystemPropertiesForName(String systemName)
Retrieve the properties for the system with the given name.
|
List<SystemProperties> |
getSystems()
Getter for the systems.
|
Integer |
getTaskTimeout(String taskName)
Determine the timeout for a task.
|
void |
setAsyncTimeoutExecutorPoolSize(Integer asyncTimeoutExecutorPoolSize)
Setter for the async task timeout executor pool size.
|
void |
setDefaultExecutor(String defaultExecutor)
Setter for the default executor.
|
void |
setDefaultTimeout(Integer defaultTimeout)
Setter for the default timeout.
|
void |
setExecutors(List<ExecutorProperties> executors)
Setter for the executors.
|
void |
setSystems(List<SystemProperties> systems)
Setter for the systems.
|
public String getDefaultExecutor()
public void setDefaultExecutor(String defaultExecutor)
defaultExecutor - the default executorpublic Integer getDefaultTimeout()
public void setDefaultTimeout(Integer defaultTimeout)
defaultTimeout - the default timeoutpublic Integer getAsyncTimeoutExecutorPoolSize()
public void setAsyncTimeoutExecutorPoolSize(Integer asyncTimeoutExecutorPoolSize)
asyncTimeoutExecutorPoolSize - the core pool size to set.public List<ExecutorProperties> getExecutors()
public void setExecutors(List<ExecutorProperties> executors)
executors - the executorspublic void addExecutor(ExecutorProperties executor)
executor - the executor propertiespublic List<SystemProperties> getSystems()
public void setSystems(List<SystemProperties> systems)
systems - the systemspublic void addSystem(SystemProperties system)
system - the system propertiespublic Integer getTaskTimeout(String taskName)
The task name must be formatted as {system}.{task}. If a specific timeout is configured for the task, it is
returned. Otherwise, the system's default timeout or the general default timeout is returned as a fallback value.
taskName - the task namepublic SystemProperties getSystemPropertiesForName(String systemName)
systemName - the system name