com.elasticpath.service.catalogview.impl
Class ProductCacheLoaderImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.catalogview.impl.ProductCacheLoaderImpl
All Implemented Interfaces:
ProductCacheLoader, EpService

public class ProductCacheLoaderImpl
extends AbstractEpServiceImpl
implements ProductCacheLoader

Loads products into the product cache. This is only supported when using the RefreshableCachedProductRetrieveStrategy.


Constructor Summary
ProductCacheLoaderImpl()
           
 
Method Summary
 void loadAllProducts()
          Loads all products into the refreshable cache strategy.
 void setProductLoadTuner(ProductLoadTuner productLoadTuner)
          Set the product load tuner to be used for loading the cache.
 void setProductService(ProductService productService)
          Set the product service.
 void setRefreshableCachedProductRetrieveStrategy(RefreshableCachedProductRetrieveStrategy refreshableCachedProductRetrieveStrategy)
          Set the refreshable cached product retrieve strategy whose cache is to be loaded.
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Constructor Detail

ProductCacheLoaderImpl

public ProductCacheLoaderImpl()
Method Detail

loadAllProducts

public void loadAllProducts()
Loads all products into the refreshable cache strategy.

Specified by:
loadAllProducts in interface ProductCacheLoader

setProductLoadTuner

public void setProductLoadTuner(ProductLoadTuner productLoadTuner)
Set the product load tuner to be used for loading the cache. This should be the same load tuner as the one used by the category view page. Alternatively, you may choose to use the tuner for the product page so that product pages load faster. In this case, the cache will take longer to load.

Parameters:
productLoadTuner - the load tuner

setProductService

public void setProductService(ProductService productService)
Set the product service.

Parameters:
productService - the product service

setRefreshableCachedProductRetrieveStrategy

public void setRefreshableCachedProductRetrieveStrategy(RefreshableCachedProductRetrieveStrategy refreshableCachedProductRetrieveStrategy)
Set the refreshable cached product retrieve strategy whose cache is to be loaded.

Parameters:
refreshableCachedProductRetrieveStrategy - the strategy whose cache is to be reloaded