Package org.hawaiiframework.async.model
Class ExecutorConfigurationProperties
- java.lang.Object
- 
- org.hawaiiframework.async.model.ExecutorConfigurationProperties
 
- 
 public class ExecutorConfigurationProperties extends Object Configuration properties for the asynchronous execution. The properties consist of two parts:- Executors
- Systems, containing Calls
 From each of the executor configurations, a ThreadPoolTaskExecutorwill 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. - Since:
- 2.0.0
- Author:
- Rutger Lubbers, Paul Klos
 
- 
- 
Constructor SummaryConstructors Constructor Description ExecutorConfigurationProperties()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExecutor(ExecutorProperties executor)Convenience method to add properties for a single executor.voidaddSystem(SystemProperties system)Convenience method to add properties for a single system.IntegergetAsyncTimeoutExecutorPoolSize()Getter for the async task timeout executor pool size.StringgetDefaultExecutor()Getter for the default executor.IntegergetDefaultTimeout()Getter for default timeout.List<ExecutorProperties>getExecutors()Getter for the executors.SystemPropertiesgetSystemPropertiesForName(String systemName)Retrieve the properties for the system with the given name.List<SystemProperties>getSystems()Getter for the systems.IntegergetTaskTimeout(String taskName)Determine the timeout for a task.voidsetAsyncTimeoutExecutorPoolSize(Integer asyncTimeoutExecutorPoolSize)Setter for the async task timeout executor pool size.voidsetDefaultExecutor(String defaultExecutor)Setter for the default executor.voidsetDefaultTimeout(Integer defaultTimeout)Setter for the default timeout.voidsetExecutors(List<ExecutorProperties> executors)Setter for the executors.voidsetSystems(List<SystemProperties> systems)Setter for the systems.
 
- 
- 
- 
Method Detail- 
getDefaultExecutorpublic String getDefaultExecutor() Getter for the default executor.- Returns:
- the default executor
 
 - 
setDefaultExecutorpublic void setDefaultExecutor(String defaultExecutor) Setter for the default executor.- Parameters:
- defaultExecutor- the default executor
 
 - 
getDefaultTimeoutpublic Integer getDefaultTimeout() Getter for default timeout.- Returns:
- the default timeout
 
 - 
setDefaultTimeoutpublic void setDefaultTimeout(Integer defaultTimeout) Setter for the default timeout.- Parameters:
- defaultTimeout- the default timeout
 
 - 
getAsyncTimeoutExecutorPoolSizepublic Integer getAsyncTimeoutExecutorPoolSize() Getter for the async task timeout executor pool size.- Returns:
- the core pool size to use.
 
 - 
setAsyncTimeoutExecutorPoolSizepublic void setAsyncTimeoutExecutorPoolSize(Integer asyncTimeoutExecutorPoolSize) Setter for the async task timeout executor pool size.- Parameters:
- asyncTimeoutExecutorPoolSize- the core pool size to set.
 
 - 
getExecutorspublic List<ExecutorProperties> getExecutors() Getter for the executors.- Returns:
- the executors
 
 - 
setExecutorspublic void setExecutors(List<ExecutorProperties> executors) Setter for the executors.- Parameters:
- executors- the executors
 
 - 
addExecutorpublic void addExecutor(ExecutorProperties executor) Convenience method to add properties for a single executor.- Parameters:
- executor- the executor properties
 
 - 
getSystemspublic List<SystemProperties> getSystems() Getter for the systems.- Returns:
- the systems
 
 - 
setSystemspublic void setSystems(List<SystemProperties> systems) Setter for the systems.- Parameters:
- systems- the systems
 
 - 
addSystempublic void addSystem(SystemProperties system) Convenience method to add properties for a single system.- Parameters:
- system- the system properties
 
 - 
getTaskTimeoutpublic Integer getTaskTimeout(String taskName) Determine the timeout for a task.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.- Parameters:
- taskName- the task name
- Returns:
- the timeout, or null if the task or system doesn't exist
 
 - 
getSystemPropertiesForNamepublic SystemProperties getSystemPropertiesForName(String systemName) Retrieve the properties for the system with the given name.- Parameters:
- systemName- the system name
- Returns:
- the properties
 
 
- 
 
-