Package org.apache.solr.search
Class SolrCacheBase
- java.lang.Object
 - 
- org.apache.solr.search.SolrCacheBase
 
 
- 
- Direct Known Subclasses:
 CaffeineCache
public abstract class SolrCacheBase extends Object
Common base class of reusable functionality for SolrCaches 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSolrCacheBase.AutoWarmCountRefDecides how many things to autowarm based on the size of another cache 
- 
Field Summary
Fields Modifier and Type Field Description protected SolrCacheBase.AutoWarmCountRefautowarmprotected CacheRegeneratorregenerator 
- 
Constructor Summary
Constructors Constructor Description SolrCacheBase() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static floatcalcHitRatio(long lookups, long hits)Returns a "Hit Ratio" (ie: max of 1.00, not a percentage) suitable for display purposes.protected StringgetAutowarmDescription()SolrInfoBean.CategorygetCategory()SolrCache.StategetState()StringgetVersion()voidinit(Map<String,String> args, CacheRegenerator regenerator)protected booleanisAutowarmingOn()Stringname()voidsetState(SolrCache.State state) 
 - 
 
- 
- 
Field Detail
- 
regenerator
protected CacheRegenerator regenerator
 
- 
autowarm
protected SolrCacheBase.AutoWarmCountRef autowarm
 
 - 
 
- 
Method Detail
- 
calcHitRatio
protected static float calcHitRatio(long lookups, long hits)Returns a "Hit Ratio" (ie: max of 1.00, not a percentage) suitable for display purposes. 
- 
getVersion
public String getVersion()
 
- 
getCategory
public SolrInfoBean.Category getCategory()
 
- 
init
public void init(Map<String,String> args, CacheRegenerator regenerator)
 
- 
getAutowarmDescription
protected String getAutowarmDescription()
 
- 
isAutowarmingOn
protected boolean isAutowarmingOn()
 
- 
setState
public void setState(SolrCache.State state)
 
- 
getState
public SolrCache.State getState()
 
- 
name
public String name()
 
 - 
 
 -