Package org.apache.solr.search
Interface CacheRegenerator
-
- All Known Implementing Classes:
NoOpRegenerator
public interface CacheRegenerator
Implementations ofCacheRegenerator
are used in autowarming to populate a new cache based on an old cache.regenerateItem
is called for each item that should be inserted into the new cache.Implementations should have a noarg constructor and be thread safe (a single instance will be used for all cache autowarmings).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K,V>
booleanregenerateItem(SolrIndexSearcher newSearcher, SolrCache<K,V> newCache, SolrCache<K,V> oldCache, K oldKey, V oldVal)
Regenerate an old cache item and insert it intonewCache
-
-
-
Method Detail
-
regenerateItem
<K,V> boolean regenerateItem(SolrIndexSearcher newSearcher, SolrCache<K,V> newCache, SolrCache<K,V> oldCache, K oldKey, V oldVal) throws IOException
Regenerate an old cache item and insert it intonewCache
- Parameters:
newSearcher
- the new searcher who's caches are being autowarmednewCache
- where regenerated cache items should be stored. the target of the autowarmingoldCache
- the old cache being used as a source for autowarmingoldKey
- the key of the old cache item to regenerate in the new cacheoldVal
- the old value of the cache item- Returns:
- true to continue with autowarming, false to stop
- Throws:
IOException
-
-