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 int
DEFAULT_TRANSIENT_CACHE_SIZE
Deprecated.static String
TRANSIENT_CACHE_SIZE
Deprecated.protected com.github.benmanes.caffeine.cache.Cache<String,SolrCore>
transientCores
Deprecated."Lazily loaded" cores cache with limited size.protected Map<String,CoreDescriptor>
transientDescriptors
Deprecated.Unlimited map of all the descriptors for all the registered transient cores, including the cores in thetransientCores
as 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 SolrCore
addCore(String name, SolrCore core)
Deprecated.Adds the newly-opened core to the list of open cores.void
addTransientDescriptor(String rawName, CoreDescriptor cd)
Deprecated.Adds a newCoreDescriptor
.void
close()
Deprecated.Called in order to free resources.boolean
containsCore(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.SolrCore
getCore(String name)
Deprecated.Gets the core associated with the name.Set<String>
getLoadedCoreNames()
Deprecated.Returns the names of all currently loaded cores.int
getStatus(String coreName)
Deprecated.Gets a custom status for the given core name.CoreDescriptor
getTransientDescriptor(String name)
Deprecated.Gets theCoreDescriptor
for a transient core (loaded or unloaded).Collection<CoreDescriptor>
getTransientDescriptors()
Deprecated.Gets theCoreDescriptor
for all transient cores (loaded and unloaded).SolrCore
removeCore(String name)
Deprecated.Removes a core from the internal structures, presumably it being closed.CoreDescriptor
removeTransientDescriptor(String name)
Deprecated.Removes aCoreDescriptor
from the list of transient cores descriptors.void
setStatus(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 thetransientCores
as 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:TransientSolrCoreCache
Called in order to free resources.- Overrides:
close
in classTransientSolrCoreCache
-
addCore
public SolrCore addCore(String name, SolrCore core)
Deprecated.Description copied from class:TransientSolrCoreCache
Adds the newly-opened core to the list of open cores.- Specified by:
addCore
in classTransientSolrCoreCache
-
getAllCoreNames
public Set<String> getAllCoreNames()
Deprecated.Description copied from class:TransientSolrCoreCache
Returns the names of all possible cores, whether they are currently loaded or not.- Specified by:
getAllCoreNames
in classTransientSolrCoreCache
-
getLoadedCoreNames
public Set<String> getLoadedCoreNames()
Deprecated.Description copied from class:TransientSolrCoreCache
Returns the names of all currently loaded cores.- Specified by:
getLoadedCoreNames
in classTransientSolrCoreCache
-
removeCore
public SolrCore removeCore(String name)
Deprecated.Description copied from class:TransientSolrCoreCache
Removes 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:
removeCore
in classTransientSolrCoreCache
-
getCore
public SolrCore getCore(String name)
Deprecated.Description copied from class:TransientSolrCoreCache
Gets the core associated with the name. Returns null if there is none.- Specified by:
getCore
in classTransientSolrCoreCache
-
containsCore
public boolean containsCore(String name)
Deprecated.Description copied from class:TransientSolrCoreCache
Returns whether the cache contains the named core.- Specified by:
containsCore
in classTransientSolrCoreCache
-
addTransientDescriptor
public void addTransientDescriptor(String rawName, CoreDescriptor cd)
Deprecated.Description copied from class:TransientSolrCoreCache
Adds a newCoreDescriptor
. This method will only be called during core discovery at startup.- Specified by:
addTransientDescriptor
in classTransientSolrCoreCache
-
getTransientDescriptor
public CoreDescriptor getTransientDescriptor(String name)
Deprecated.Description copied from class:TransientSolrCoreCache
Gets theCoreDescriptor
for 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:
getTransientDescriptor
in classTransientSolrCoreCache
-
getTransientDescriptors
public Collection<CoreDescriptor> getTransientDescriptors()
Deprecated.Description copied from class:TransientSolrCoreCache
Gets theCoreDescriptor
for all transient cores (loaded and unloaded).- Specified by:
getTransientDescriptors
in classTransientSolrCoreCache
-
removeTransientDescriptor
public CoreDescriptor removeTransientDescriptor(String name)
Deprecated.Description copied from class:TransientSolrCoreCache
Removes aCoreDescriptor
from the list of transient cores descriptors.- Specified by:
removeTransientDescriptor
in classTransientSolrCoreCache
-
getStatus
public int getStatus(String coreName)
Deprecated.Description copied from class:TransientSolrCoreCache
Gets a custom status for the given core name. Allows custom implementations to communicate arbitrary information as necessary.- Specified by:
getStatus
in classTransientSolrCoreCache
-
setStatus
public void setStatus(String coreName, int status)
Deprecated.Description copied from class:TransientSolrCoreCache
Sets a custom status for the given core name. Allows custom implementations to communicate arbitrary information as necessary.- Specified by:
setStatus
in classTransientSolrCoreCache
-
-