Package org.apache.solr.search
Class SolrCacheBase
- java.lang.Object
-
- org.apache.solr.search.SolrCacheBase
-
- Direct Known Subclasses:
FastLRUCache
,LRUCache
,Metrics
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 class
SolrCacheBase.AutoWarmCountRef
Decides how many things to autowarm based on the size of another cache
-
Field Summary
Fields Modifier and Type Field Description protected SolrCacheBase.AutoWarmCountRef
autowarm
protected CacheRegenerator
regenerator
-
Constructor Summary
Constructors Constructor Description SolrCacheBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static float
calcHitRatio(long lookups, long hits)
Returns a "Hit Ratio" (ie: max of 1.00, not a percentage) suitable for display purposes.protected String
getAutowarmDescription()
SolrInfoBean.Category
getCategory()
SolrCache.State
getState()
String
getVersion()
void
init(Map<String,String> args, CacheRegenerator regenerator)
protected boolean
isAutowarmingOn()
String
name()
void
setState(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()
-
-