Class SolrIndexCachedOperation
java.lang.Object
org.broadleafcommerce.core.search.service.solr.index.SolrIndexCachedOperation
Provides a single cache while exposing a block of code for execution to
SolrIndexService.performCachedOperation(org.broadleafcommerce.core.search.service.solr.SolrIndexCachedOperation.CacheOperation).
This serves to boost performance while executing multiple calls to org.broadleafcommerce.core.search.service.solr.index.SolrIndexService#buildIncrementalIndex(int, int, boolean).- Author:
- Jeff Fischer
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBasic interface representing a block of work to perform with a single cache instance -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear the thread local cache from the threadstatic CatalogStructuregetCache()Retrieve the cache bound to the current thread.static voidsetCache(CatalogStructure cache) Set the cache on the current thread
-
Field Details
-
DEFAULT_CATALOG_CACHE_KEY
-
-
Constructor Details
-
SolrIndexCachedOperation
public SolrIndexCachedOperation()
-
-
Method Details
-
getCache
Retrieve the cache bound to the current thread.- Returns:
- The cache for the current thread, or null if not set
-
setCache
Set the cache on the current thread- Parameters:
cache- the cache object (usually an empty map)
-
clearCache
public static void clearCache()Clear the thread local cache from the thread
-