Class CPSCacheImpl
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.cache.impl.CPSCacheImpl
- All Implemented Interfaces:
CPSCache
Default implementation of
CPSCache. Stores related artifacts in the hybris cache.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConfiguration(String configId) Retrieves the runtime configuration from cache.protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,CPSConfiguration> protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,List<String>> getCookies(String configId) protected CPSCacheKeyGeneratorprotected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,Map<CPSMasterDataVariantPriceKey, CPSValuePrice>> getValuePricesMap(String kbId, String pricingProduct) Get ValuePrice from cachevoidpopulateCacheKeyContextAttributes(Map<String, String> contextAttr, String clientId) Populates the map with all cache key components that depend on the current sessionContext, so a cache key for a given configId can re-created independently of the current session/thread context.voidremoveConfiguration(String configId) Removes the specified configuration from cachevoidremoveConfiguration(String configId, Map<String, String> ctxtAttributes) Removes the specified configuration from cachevoidremoveCookies(String configId) Removes cookies per configIdvoidremoveCookies(String configId, Map<String, String> contextAttr) Removes cookies per configIdvoidsetConfiguration(String configId, CPSConfiguration configuration) Sets the runtime configuration into the cachevoidsetConfigurationCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey, CPSConfiguration> configurationCache) voidsetCookieCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey, List<String>> cookieCache) voidsetCookies(String configId, List<String> cookieList) Sets cookies per configIdvoidSets cookies per configIdvoidsetKeyGenerator(CPSCacheKeyGenerator keyGenerator) voidsetValuePricesCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey, Map<CPSMasterDataVariantPriceKey, CPSValuePrice>> valuePricesCache) voidsetValuePricesMap(String kbId, String pricingProduct, Map<CPSMasterDataVariantPriceKey, CPSValuePrice> valuePricesMap) Sets ValuePrice into cache
-
Constructor Details
-
CPSCacheImpl
public CPSCacheImpl()
-
-
Method Details
-
setValuePricesMap
public void setValuePricesMap(String kbId, String pricingProduct, Map<CPSMasterDataVariantPriceKey, CPSValuePrice> valuePricesMap) Description copied from interface:CPSCacheSets ValuePrice into cache- Specified by:
setValuePricesMapin interfaceCPSCache- Parameters:
kbId- knowledgebase idpricingProduct- productId of the pricing productvaluePricesMap- map of value prices
-
getValuePricesMap
public Map<CPSMasterDataVariantPriceKey,CPSValuePrice> getValuePricesMap(String kbId, String pricingProduct) Description copied from interface:CPSCacheGet ValuePrice from cache- Specified by:
getValuePricesMapin interfaceCPSCache- Parameters:
kbId- knowledgebase idpricingProduct- productId of the pricing product- Returns:
- map of value prices
-
setCookies
Description copied from interface:CPSCacheSets cookies per configId- Specified by:
setCookiesin interfaceCPSCache- Parameters:
configId- ID of runtime configuration
-
setCookies
Description copied from interface:CPSCacheSets cookies per configId- Specified by:
setCookiesin interfaceCPSCache- Parameters:
configId- ID of runtime configurationcontextAttr- context with cache key components
-
getCookies
- Specified by:
getCookiesin interfaceCPSCache- Returns:
- List of cookies per configId
-
removeCookies
Description copied from interface:CPSCacheRemoves cookies per configId- Specified by:
removeCookiesin interfaceCPSCache
-
removeCookies
Description copied from interface:CPSCacheRemoves cookies per configId- Specified by:
removeCookiesin interfaceCPSCache
-
populateCacheKeyContextAttributes
Description copied from interface:CPSCachePopulates the map with all cache key components that depend on the current sessionContext, so a cache key for a given configId can re-created independently of the current session/thread context.- Specified by:
populateCacheKeyContextAttributesin interfaceCPSCache
-
getConfiguration
Description copied from interface:CPSCacheRetrieves the runtime configuration from cache.- Specified by:
getConfigurationin interfaceCPSCache- Parameters:
configId- runtime configuration id- Returns:
- runtime configuration
-
setConfiguration
Description copied from interface:CPSCacheSets the runtime configuration into the cache- Specified by:
setConfigurationin interfaceCPSCache- Parameters:
configId- runtime configuration idconfiguration- runtime configuration to be set into cache
-
removeConfiguration
Description copied from interface:CPSCacheRemoves the specified configuration from cache- Specified by:
removeConfigurationin interfaceCPSCache- Parameters:
configId- runtime configuration id
-
removeConfiguration
Description copied from interface:CPSCacheRemoves the specified configuration from cache- Specified by:
removeConfigurationin interfaceCPSCache- Parameters:
configId- runtime configuration idctxtAttributes- context attributes
-
getCookieCache
-
setCookieCache
-
getKeyGenerator
-
setKeyGenerator
-
getValuePricesCache
protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,Map<CPSMasterDataVariantPriceKey, getValuePricesCache()CPSValuePrice>> -
setValuePricesCache
public void setValuePricesCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey, Map<CPSMasterDataVariantPriceKey, CPSValuePrice>> valuePricesCache) -
getConfigurationCache
protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,CPSConfiguration> getConfigurationCache() -
setConfigurationCache
public void setConfigurationCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey, CPSConfiguration> configurationCache)
-