Package org.apache.solr.core
Class TransientSolrCoreCacheDefault
- java.lang.Object
-
- org.apache.solr.core.TransientSolrCoreCache
-
- org.apache.solr.core.TransientSolrCoreCacheDefault
-
@Deprecated(since="9.2") public class TransientSolrCoreCacheDefault extends TransientSolrCoreCache
Deprecated.Cache of the most frequently accessed transient cores. Keeps track of all the registered transient cores descriptors, including the cores in the cache as well as all the others.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_TRANSIENT_CACHE_SIZEDeprecated.static StringTRANSIENT_CACHE_SIZEDeprecated.protected com.github.benmanes.caffeine.cache.Cache<String,SolrCore>transientCoresDeprecated."Lazily loaded" cores cache with limited size.protected Map<String,CoreDescriptor>transientDescriptorsDeprecated.Unlimited map of all the descriptors for all the registered transient cores, including the cores in thetransientCoresas well as all the others.
-
Constructor Summary
Constructors Constructor Description TransientSolrCoreCacheDefault(TransientSolrCores solrCores, int cacheMaxSize)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SolrCoreaddCore(String name, SolrCore core)Deprecated.Adds the newly-opened core to the list of open cores.voidaddTransientDescriptor(String rawName, CoreDescriptor cd)Deprecated.Adds a newCoreDescriptor.voidclose()Deprecated.Called in order to free resources.booleancontainsCore(String name)Deprecated.Returns whether the cache contains the named core.Set<String>getAllCoreNames()Deprecated.Returns the names of all possible cores, whether they are currently loaded or not.SolrCoregetCore(String name)Deprecated.Gets the core associated with the name.Set<String>getLoadedCoreNames()Deprecated.Returns the names of all currently loaded cores.intgetStatus(String coreName)Deprecated.Gets a custom status for the given core name.CoreDescriptorgetTransientDescriptor(String name)Deprecated.Gets theCoreDescriptorfor a transient core (loaded or unloaded).Collection<CoreDescriptor>getTransientDescriptors()Deprecated.Gets theCoreDescriptorfor all transient cores (loaded and unloaded).SolrCoreremoveCore(String name)Deprecated.Removes a core from the internal structures, presumably it being closed.CoreDescriptorremoveTransientDescriptor(String name)Deprecated.Removes aCoreDescriptorfrom the list of transient cores descriptors.voidsetStatus(String coreName, int status)Deprecated.Sets a custom status for the given core name.
-
-
-
Field Detail
-
DEFAULT_TRANSIENT_CACHE_SIZE
public static final int DEFAULT_TRANSIENT_CACHE_SIZE
Deprecated.- See Also:
- Constant Field Values
-
TRANSIENT_CACHE_SIZE
public static final String TRANSIENT_CACHE_SIZE
Deprecated.- See Also:
- Constant Field Values
-
transientCores
protected final com.github.benmanes.caffeine.cache.Cache<String,SolrCore> transientCores
Deprecated."Lazily loaded" cores cache with limited size. When the max size is reached, the least accessed core is evicted to make room for a new core.
-
transientDescriptors
protected final Map<String,CoreDescriptor> transientDescriptors
Deprecated.Unlimited map of all the descriptors for all the registered transient cores, including the cores in thetransientCoresas well as all the others.
-
-
Constructor Detail
-
TransientSolrCoreCacheDefault
public TransientSolrCoreCacheDefault(TransientSolrCores solrCores, int cacheMaxSize)
Deprecated.
-
-
Method Detail
-
close
public void close()
Deprecated.Description copied from class:TransientSolrCoreCacheCalled in order to free resources.- Overrides:
closein classTransientSolrCoreCache
-
addCore
public SolrCore addCore(String name, SolrCore core)
Deprecated.Description copied from class:TransientSolrCoreCacheAdds the newly-opened core to the list of open cores.- Specified by:
addCorein classTransientSolrCoreCache
-
getAllCoreNames
public Set<String> getAllCoreNames()
Deprecated.Description copied from class:TransientSolrCoreCacheReturns the names of all possible cores, whether they are currently loaded or not.- Specified by:
getAllCoreNamesin classTransientSolrCoreCache
-
getLoadedCoreNames
public Set<String> getLoadedCoreNames()
Deprecated.Description copied from class:TransientSolrCoreCacheReturns the names of all currently loaded cores.- Specified by:
getLoadedCoreNamesin classTransientSolrCoreCache
-
removeCore
public SolrCore removeCore(String name)
Deprecated.Description copied from class:TransientSolrCoreCacheRemoves a core from the internal structures, presumably it being closed. If the core is re-opened, it will be re-added by CoreContainer.- Specified by:
removeCorein classTransientSolrCoreCache
-
getCore
public SolrCore getCore(String name)
Deprecated.Description copied from class:TransientSolrCoreCacheGets the core associated with the name. Returns null if there is none.- Specified by:
getCorein classTransientSolrCoreCache
-
containsCore
public boolean containsCore(String name)
Deprecated.Description copied from class:TransientSolrCoreCacheReturns whether the cache contains the named core.- Specified by:
containsCorein classTransientSolrCoreCache
-
addTransientDescriptor
public void addTransientDescriptor(String rawName, CoreDescriptor cd)
Deprecated.Description copied from class:TransientSolrCoreCacheAdds a newCoreDescriptor. This method will only be called during core discovery at startup.- Specified by:
addTransientDescriptorin classTransientSolrCoreCache
-
getTransientDescriptor
public CoreDescriptor getTransientDescriptor(String name)
Deprecated.Description copied from class:TransientSolrCoreCacheGets theCoreDescriptorfor a transient core (loaded or unloaded). This method is used when opening cores and the like. If you want to change a core's descriptor, override this method and return the current core descriptor.- Specified by:
getTransientDescriptorin classTransientSolrCoreCache
-
getTransientDescriptors
public Collection<CoreDescriptor> getTransientDescriptors()
Deprecated.Description copied from class:TransientSolrCoreCacheGets theCoreDescriptorfor all transient cores (loaded and unloaded).- Specified by:
getTransientDescriptorsin classTransientSolrCoreCache
-
removeTransientDescriptor
public CoreDescriptor removeTransientDescriptor(String name)
Deprecated.Description copied from class:TransientSolrCoreCacheRemoves aCoreDescriptorfrom the list of transient cores descriptors.- Specified by:
removeTransientDescriptorin classTransientSolrCoreCache
-
getStatus
public int getStatus(String coreName)
Deprecated.Description copied from class:TransientSolrCoreCacheGets a custom status for the given core name. Allows custom implementations to communicate arbitrary information as necessary.- Specified by:
getStatusin classTransientSolrCoreCache
-
setStatus
public void setStatus(String coreName, int status)
Deprecated.Description copied from class:TransientSolrCoreCacheSets a custom status for the given core name. Allows custom implementations to communicate arbitrary information as necessary.- Specified by:
setStatusin classTransientSolrCoreCache
-
-