Package org.apache.solr.core
Interface CoresLocator
- All Known Implementing Classes:
CorePropertiesLocator
public interface CoresLocator
Manage the discovery and persistence of core definitions across Solr restarts
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(CoreContainer cc, CoreDescriptor... coreDescriptors) Make new cores available for discoveryvoiddelete(CoreContainer cc, CoreDescriptor... coreDescriptors) Ensure that the core definitions from the passed in CoreDescriptors are not available for discoveryLoad all the CoreDescriptors from persistence storestatic CoresLocatorinstantiate(NodeConfig nodeConfig) Returns a new instance ofCoresLocator, depending on provided config.voidpersist(CoreContainer cc, CoreDescriptor... coreDescriptors) Ensure that the core definitions from the passed in CoreDescriptors will persist across container restarts.reload(CoreDescriptor cd, CoreContainer cc) Reload a core descriptor.voidrename(CoreContainer cc, CoreDescriptor oldCD, CoreDescriptor newCD) Persist the new name of a renamed corevoidswap(CoreContainer cc, CoreDescriptor cd1, CoreDescriptor cd2) Swap two core definitions
-
Method Details
-
create
Make new cores available for discovery- Parameters:
cc- the CoreContainercoreDescriptors- CoreDescriptors to persist
-
persist
Ensure that the core definitions from the passed in CoreDescriptors will persist across container restarts.- Parameters:
cc- the CoreContainercoreDescriptors- CoreDescriptors to persist
-
delete
Ensure that the core definitions from the passed in CoreDescriptors are not available for discovery- Parameters:
cc- the CoreContainercoreDescriptors- CoreDescriptors of the cores to remove
-
rename
Persist the new name of a renamed core- Parameters:
cc- the CoreContaineroldCD- the CoreDescriptor of the core before renamingnewCD- the CoreDescriptor of the core after renaming
-
swap
Swap two core definitions- Parameters:
cc- the CoreContainercd1- the core descriptor of the first core, after swappingcd2- the core descriptor of the second core, after swapping
-
discover
Load all the CoreDescriptors from persistence store- Parameters:
cc- the CoreContainer- Returns:
- a list of all CoreDescriptors found
-
reload
Reload a core descriptor.- Parameters:
cd- the old core descriptorcc- the CoreContainer- Returns:
- a new core descriptor
-
instantiate
Returns a new instance ofCoresLocator, depending on provided config.- Parameters:
nodeConfig- Solr configuration.
-