Class DataExchangeServiceAutoConfiguration
java.lang.Object
com.broadleafcommerce.dataexchange.service.autoconfigure.DataExchangeServiceAutoConfiguration
@Configuration
@EnableConfigurationProperties({DataExchangeProperties.class,DataExchangeTaskExecutorProperties.class,DataExchangeLockCacheProperties.class})
public class DataExchangeServiceAutoConfiguration
extends Object
- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadvancedTagPreloader
(AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider) comprehensiveProductExchangeService
(org.springframework.core.task.AsyncTaskExecutor taskExecutor, org.springframework.retry.support.RetryTemplate retryTemplate, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CatalogProvider<ComprehensiveProduct, Variant> catalogProvider, DataExchangeProperties dataExchangeProperties, List<BatchExtensionProcessor> batchExtensionProcessors, ProductBatchItemHandler<ComprehensiveProduct> productBatchItemHandler) org.springframework.retry.support.RetryTemplate
Contrary to the bean name, there is nothing about thisRetryTemplate
that is, in itself, asynchronous.org.springframework.core.task.AsyncTaskExecutor
Returns a sharedThreadPoolTaskExecutor
, by default.lockService
(DataExchangeLockCacheProperties properties) priceDataPreloadProcessor
(PriceProvider<PriceData> pricingProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) productAssetBatchItemHandler
(ProductAssetProvider<ProductAsset> assetProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) productBatchItemHandler
(CatalogProvider<ComprehensiveProduct, Variant> catalogProvider, ProductBatchItemHandlerHelper<ComprehensiveProduct> helper, VariantBatchItemHandler<Variant> variantBatchItemHandler, AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider, ProductTagBatchItemHandler<ProductTag> tagBatchItemHandler, List<ProductRelatedBatchItemHandler<ComprehensiveProduct, ?>> childItemHandlers, com.broadleafcommerce.common.extension.TypeFactory typeFactory) productPriceDataItemHandler
(PriceProvider<PriceData> priceProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) productTagBatchItemHandler
(AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider, ProductBatchItemHandlerHelper<ComprehensiveProduct> helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) productVariantBatchItemHandler
(CatalogProvider<ComprehensiveProduct, Variant> catalogProvider, ProductTagBatchItemHandler<ProductTag> productTagBatchItemHandler, AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider, List<VariantRelatedBatchItemHandler<ComprehensiveProduct, ?>> childItemHandlers, ProductBatchItemHandlerHelper<ComprehensiveProduct> helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) skuInventoryItemHandler
(InventoryProvider<SkuInventory> inventoryProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
Constructor Details
-
DataExchangeServiceAutoConfiguration
public DataExchangeServiceAutoConfiguration()
-
-
Method Details
-
dataExchangeFuturesTaskExecutor
@Bean @ConditionalOnMissingBean(name="dataExchangeFuturesTaskExecutor") public org.springframework.core.task.AsyncTaskExecutor dataExchangeFuturesTaskExecutor(DataExchangeTaskExecutorProperties properties) Returns a sharedThreadPoolTaskExecutor
, by default. This will be used to parallelize orchestrated calls to multiple services or service endpoints. By default, this has a relatively high thread count (100) because these threads will spend time waiting for I/O.- Parameters:
properties
-- Returns:
-
comprehensiveProductExchangeService
@Bean @ConditionalOnMissingBean public ComprehensiveProductExchangeService<ComprehensiveProduct> comprehensiveProductExchangeService(@Qualifier("dataExchangeFuturesTaskExecutor") org.springframework.core.task.AsyncTaskExecutor taskExecutor, @Qualifier("dataExchangeAsyncRetryTemplate") org.springframework.retry.support.RetryTemplate retryTemplate, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CatalogProvider<ComprehensiveProduct, Variant> catalogProvider, DataExchangeProperties dataExchangeProperties, List<BatchExtensionProcessor> batchExtensionProcessors, ProductBatchItemHandler<ComprehensiveProduct> productBatchItemHandler) -
dataExchangeAsyncRetryTemplate
@Bean @ConditionalOnMissingBean(name="dataExchangeAsyncRetryTemplate") public org.springframework.retry.support.RetryTemplate dataExchangeAsyncRetryTemplate(DataExchangeTaskExecutorProperties properties) Contrary to the bean name, there is nothing about thisRetryTemplate
that is, in itself, asynchronous. However, this is used by theRetryable
object to allow for automatic retries in case of failures during asynchronous execution. This assists with retry logic to prevent batch failures due to short-lived or transient failures. This instance is thread safe.- Parameters:
properties
-- Returns:
- See Also:
-
skuInventoryItemHandler
@Bean @ConditionalOnMissingBean(name="skuInventorySimpleBatchItemHandler") public ProductRelatedBatchItemHandler<ComprehensiveProduct,SkuInventory> skuInventoryItemHandler(InventoryProvider<SkuInventory> inventoryProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
priceDataPreloadProcessor
@Bean @ConditionalOnMissingBean(name="priceDataPreloadProcessor") public BatchExtensionProcessor priceDataPreloadProcessor(PriceProvider<PriceData> pricingProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
productPriceDataItemHandler
@Bean @ConditionalOnMissingBean(name="productPriceDataItemHandler") public ProductRelatedBatchItemHandler<ComprehensiveProduct,Prices> productPriceDataItemHandler(PriceProvider<PriceData> priceProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
productBatchItemHandler
@Bean @ConditionalOnMissingBean public ProductBatchItemHandler<ComprehensiveProduct> productBatchItemHandler(CatalogProvider<ComprehensiveProduct, Variant> catalogProvider, ProductBatchItemHandlerHelper<ComprehensiveProduct> helper, VariantBatchItemHandler<Variant> variantBatchItemHandler, AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider, ProductTagBatchItemHandler<ProductTag> tagBatchItemHandler, List<ProductRelatedBatchItemHandler<ComprehensiveProduct, ?>> childItemHandlers, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
productVariantBatchItemHandler
@Bean @ConditionalOnMissingBean public VariantBatchItemHandler<Variant> productVariantBatchItemHandler(CatalogProvider<ComprehensiveProduct, Variant> catalogProvider, ProductTagBatchItemHandler<ProductTag> productTagBatchItemHandler, AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider, List<VariantRelatedBatchItemHandler<ComprehensiveProduct, ?>> childItemHandlers, ProductBatchItemHandlerHelper<ComprehensiveProduct> helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
lockService
@Bean @ConditionalOnMissingBean public LockService lockService(DataExchangeLockCacheProperties properties) -
productAssetBatchItemHandler
@Bean @ConditionalOnMissingBean(name="productAssetBatchItemHandler") public ProductRelatedBatchItemHandler<ComprehensiveProduct,ProductAsset> productAssetBatchItemHandler(ProductAssetProvider<ProductAsset> assetProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
productBatchItemHandlerHelper
@Bean @ConditionalOnMissingBean public ProductBatchItemHandlerHelper<ComprehensiveProduct> productBatchItemHandlerHelper() -
productTagBatchItemHandler
@Bean @ConditionalOnMissingBean public ProductTagBatchItemHandler<ProductTag> productTagBatchItemHandler(AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider, ProductBatchItemHandlerHelper<ComprehensiveProduct> helper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
advancedTagPreloader
@Bean @ConditionalOnMissingBean(name="advancedTagPreloader") public BatchExtensionProcessor advancedTagPreloader(AdvancedTagProvider<AdvancedTag, ProductTag> tagProvider)
-