public class ExecutorConfigurationProperties
extends java.lang.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.
|
java.lang.Integer |
getAsyncTimeoutExecutorPoolSize()
Getter for the async task timeout executor pool size.
|
java.lang.String |
getDefaultExecutor()
Getter for the default executor.
|
java.lang.Integer |
getDefaultTimeout()
Getter for default timeout.
|
java.util.List<ExecutorProperties> |
getExecutors()
Getter for the executors.
|
SystemProperties |
getSystemPropertiesForName(java.lang.String systemName)
Retrieve the properties for the system with the given name.
|
java.util.List<SystemProperties> |
getSystems()
Getter for the systems.
|
java.lang.Integer |
getTaskTimeout(java.lang.String taskName)
Determine the timeout for a task.
|
void |
setAsyncTimeoutExecutorPoolSize(java.lang.Integer asyncTimeoutExecutorPoolSize)
Setter for the async task timeout executor pool size.
|
void |
setDefaultExecutor(java.lang.String defaultExecutor)
Setter for the default executor.
|
void |
setDefaultTimeout(java.lang.Integer defaultTimeout)
Setter for the default timeout.
|
void |
setExecutors(java.util.List<ExecutorProperties> executors)
Setter for the executors.
|
void |
setSystems(java.util.List<SystemProperties> systems)
Setter for the systems.
|
public java.lang.String getDefaultExecutor()
public void setDefaultExecutor(java.lang.String defaultExecutor)
defaultExecutor
- the default executorpublic java.lang.Integer getDefaultTimeout()
public void setDefaultTimeout(java.lang.Integer defaultTimeout)
defaultTimeout
- the default timeoutpublic java.lang.Integer getAsyncTimeoutExecutorPoolSize()
public void setAsyncTimeoutExecutorPoolSize(java.lang.Integer asyncTimeoutExecutorPoolSize)
asyncTimeoutExecutorPoolSize
- the core pool size to set.public java.util.List<ExecutorProperties> getExecutors()
public void setExecutors(java.util.List<ExecutorProperties> executors)
executors
- the executorspublic void addExecutor(ExecutorProperties executor)
executor
- the executor propertiespublic java.util.List<SystemProperties> getSystems()
public void setSystems(java.util.List<SystemProperties> systems)
systems
- the systemspublic void addSystem(SystemProperties system)
system
- the system propertiespublic java.lang.Integer getTaskTimeout(java.lang.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(java.lang.String systemName)
systemName
- the system name