org.apache.solr.search
Class SolrCacheBase

java.lang.Object
  extended by org.apache.solr.search.SolrCacheBase
Direct Known Subclasses:
FastLRUCache, LRUCache

public abstract class SolrCacheBase
extends Object

Common base class of reusable functionality for SolrCaches


Nested Class Summary
static class SolrCacheBase.AutoWarmCountRef
          Decides how many things to autowarm based on the size of another cache
 
Field Summary
protected  SolrCacheBase.AutoWarmCountRef autowarm
           
protected  CacheRegenerator regenerator
           
 
Constructor Summary
SolrCacheBase()
           
 
Method Summary
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()
           
 SolrInfoMBean.Category getCategory()
           
 URL[] getDocs()
           
 SolrCache.State getState()
           
 String getVersion()
           
 void init(Map<String,String> args, CacheRegenerator regenerator)
           
protected  boolean isAutowarmingOn()
           
 String name()
           
 void setState(SolrCache.State state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regenerator

protected CacheRegenerator regenerator

autowarm

protected SolrCacheBase.AutoWarmCountRef autowarm
Constructor Detail

SolrCacheBase

public SolrCacheBase()
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 SolrInfoMBean.Category getCategory()

getDocs

public URL[] getDocs()

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()


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.