Class DataExchangeTaskExecutorProperties
java.lang.Object
com.broadleafcommerce.dataexchange.service.autoconfigure.DataExchangeTaskExecutorProperties
@ConfigurationProperties("broadleaf.dataexchange.async")
public class DataExchangeTaskExecutorProperties
extends Object
Properties to assist in tuning an 
AsyncTaskExecutor and
 RetryTemplate to handle asynchronous tasks that are
 usually called as part of a synchronous composition.- Author:
 - Kelly Tisdell (ktisdell)
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleandoubleThis is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries.longThis is used to construct aRetryTemplateand indicates the initial time to wait after an exception is encountered, but before a retry occurs.longThis is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries.longMax time to wait space to become available to schedule a task.intMaximum tries that should be executed, including initial try and retries.intThe maximum number offuture tasksthat can be queued.intThe core and maximum number of threads in the thread pool.inthashCode()voidsetDelayMultiplier(double delayMultiplier) This is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries.voidsetInitialDelayMillis(long initialDelayMillis) This is used to construct aRetryTemplateand indicates the initial time to wait after an exception is encountered, but before a retry occurs.voidsetMaxDelayMillis(long maxDelayMillis) This is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries.voidsetMaxQueueAddTimeMillis(long maxQueueAddTimeMillis) Max time to wait space to become available to schedule a task.voidsetMaxTries(int maxTries) Maximum tries that should be executed, including initial try and retries.voidsetTaskExecutorQueueCapacity(int taskExecutorQueueCapacity) The maximum number offuture tasksthat can be queued.voidsetTaskExecutorThreadPoolSize(int taskExecutorThreadPoolSize) The core and maximum number of threads in the thread pool.toString() 
- 
Constructor Details
- 
DataExchangeTaskExecutorProperties
public DataExchangeTaskExecutorProperties() 
 - 
 - 
Method Details
- 
getTaskExecutorQueueCapacity
public int getTaskExecutorQueueCapacity()The maximum number offuture tasksthat can be queued. Default is 1000, meaning that 1000 tasks can be queued before the queue starts blocking.- See Also:
 - 
ExecutorConfigurationSupport.setRejectedExecutionHandler(RejectedExecutionHandler)BlockingRejectedExecutionHandler
 
 - 
getTaskExecutorThreadPoolSize
public int getTaskExecutorThreadPoolSize()The core and maximum number of threads in the thread pool. Note that these threads will mostly be engaged in I/O, specifically making REST API calls or other network calls to other services. Default is 10, meaning that 10 threads will be available to concurrently call other services.- See Also:
 
 - 
getMaxQueueAddTimeMillis
public long getMaxQueueAddTimeMillis()Max time to wait space to become available to schedule a task. This value must be greater than 0. Increasing this value may reduceRejectedExecutionExceptions, but at the cost of blocking threads. Default is 1000 ms. - 
getMaxTries
public int getMaxTries()Maximum tries that should be executed, including initial try and retries. Must be greater than 0. Default is 3.- See Also:
 - 
RetryTemplateBuilder.maxAttempts(int)
 
 - 
getInitialDelayMillis
public long getInitialDelayMillis()This is used to construct aRetryTemplateand indicates the initial time to wait after an exception is encountered, but before a retry occurs. This value is in milliseconds and must be greater than 0. Default is 50 ms.- See Also:
 - 
RetryTemplateBuilder.exponentialBackoff(long, double, long)
 
 - 
getDelayMultiplier
public double getDelayMultiplier()This is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries. This value is aDoublevalue and must be greater than 1. Default is 2.- See Also:
 - 
RetryTemplateBuilder.exponentialBackoff(long, double, long)
 
 - 
getMaxDelayMillis
public long getMaxDelayMillis()This is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries. This value is in milliseconds and must be greater thangetInitialDelayMillis(). Default is 150 ms.- See Also:
 - 
getInitialDelayMillis()getMaxTries()getDelayMultiplier()RetryTemplateBuilder.exponentialBackoff(long, double, long)
 
 - 
setTaskExecutorQueueCapacity
public void setTaskExecutorQueueCapacity(int taskExecutorQueueCapacity) The maximum number offuture tasksthat can be queued. Default is 1000, meaning that 1000 tasks can be queued before the queue starts blocking.- See Also:
 - 
ExecutorConfigurationSupport.setRejectedExecutionHandler(RejectedExecutionHandler)BlockingRejectedExecutionHandler
 
 - 
setTaskExecutorThreadPoolSize
public void setTaskExecutorThreadPoolSize(int taskExecutorThreadPoolSize) The core and maximum number of threads in the thread pool. Note that these threads will mostly be engaged in I/O, specifically making REST API calls or other network calls to other services. Default is 10, meaning that 10 threads will be available to concurrently call other services.- See Also:
 
 - 
setMaxQueueAddTimeMillis
public void setMaxQueueAddTimeMillis(long maxQueueAddTimeMillis) Max time to wait space to become available to schedule a task. This value must be greater than 0. Increasing this value may reduceRejectedExecutionExceptions, but at the cost of blocking threads. Default is 1000 ms. - 
setMaxTries
public void setMaxTries(int maxTries) Maximum tries that should be executed, including initial try and retries. Must be greater than 0. Default is 3.- See Also:
 - 
RetryTemplateBuilder.maxAttempts(int)
 
 - 
setInitialDelayMillis
public void setInitialDelayMillis(long initialDelayMillis) This is used to construct aRetryTemplateand indicates the initial time to wait after an exception is encountered, but before a retry occurs. This value is in milliseconds and must be greater than 0. Default is 50 ms.- See Also:
 - 
RetryTemplateBuilder.exponentialBackoff(long, double, long)
 
 - 
setDelayMultiplier
public void setDelayMultiplier(double delayMultiplier) This is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries. This value is aDoublevalue and must be greater than 1. Default is 2.- See Also:
 - 
RetryTemplateBuilder.exponentialBackoff(long, double, long)
 
 - 
setMaxDelayMillis
public void setMaxDelayMillis(long maxDelayMillis) This is used to construct aRetryTemplateand indicates a multiplier that is used on the second and subsequent retries. This value is in milliseconds and must be greater thangetInitialDelayMillis(). Default is 150 ms.- See Also:
 - 
getInitialDelayMillis()getMaxTries()getDelayMultiplier()RetryTemplateBuilder.exponentialBackoff(long, double, long)
 
 - 
equals
 - 
canEqual
 - 
hashCode
public int hashCode() - 
toString
 
 -