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 and 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 and Description
    --- | ---
    `protected SolrCacheBase.AutoWarmCountRef` | `autowarm`
    `protected CacheRegenerator` | `regenerator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolrCacheBase()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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()`
    `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-2016 Apache Software Foundation. All Rights Reserved.