Class SolrIndexCachedOperation

java.lang.Object
org.broadleafcommerce.core.search.service.solr.index.SolrIndexCachedOperation

public class SolrIndexCachedOperation extends Object
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:
  • Field Details

    • DEFAULT_CATALOG_CACHE_KEY

      public static final Long DEFAULT_CATALOG_CACHE_KEY
  • Constructor Details

    • SolrIndexCachedOperation

      public SolrIndexCachedOperation()
  • Method Details

    • getCache

      public static CatalogStructure getCache()
      Retrieve the cache bound to the current thread.
      Returns:
      The cache for the current thread, or null if not set
    • setCache

      public static void setCache(CatalogStructure cache)
      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