Package org.apache.solr.core
Class CorePropertiesLocator
java.lang.Object
org.apache.solr.core.CorePropertiesLocator
- All Implemented Interfaces:
CoresLocator
Persists CoreDescriptors as properties files
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCorePropertiesLocator(Path coreDiscoveryRoot) CorePropertiesLocator(NodeConfig nodeConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected CoreDescriptorbuildCoreDescriptor(Path propertiesFile, CoreContainer cc) protected Propertiesvoidcreate(CoreContainer cc, CoreDescriptor... coreDescriptors) Make new cores available for discoveryprotected static StringcreateName(Properties p, Path instanceDir) voiddelete(CoreContainer cc, CoreDescriptor... coreDescriptors) Ensure that the core definitions from the passed in CoreDescriptors are not available for discoveryLoad all the CoreDescriptors from persistence storevoidpersist(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
-
Field Details
-
PROPERTIES_FILENAME
- See Also:
-
-
Constructor Details
-
CorePropertiesLocator
-
CorePropertiesLocator
-
-
Method Details
-
create
Description copied from interface:CoresLocatorMake new cores available for discovery- Specified by:
createin interfaceCoresLocator- Parameters:
cc- the CoreContainercoreDescriptors- CoreDescriptors to persist
-
persist
Description copied from interface:CoresLocatorEnsure that the core definitions from the passed in CoreDescriptors will persist across container restarts.- Specified by:
persistin interfaceCoresLocator- Parameters:
cc- the CoreContainercoreDescriptors- CoreDescriptors to persist
-
delete
Description copied from interface:CoresLocatorEnsure that the core definitions from the passed in CoreDescriptors are not available for discovery- Specified by:
deletein interfaceCoresLocator- Parameters:
cc- the CoreContainercoreDescriptors- CoreDescriptors of the cores to remove
-
rename
Description copied from interface:CoresLocatorPersist the new name of a renamed core- Specified by:
renamein interfaceCoresLocator- Parameters:
cc- the CoreContaineroldCD- the CoreDescriptor of the core before renamingnewCD- the CoreDescriptor of the core after renaming
-
swap
Description copied from interface:CoresLocatorSwap two core definitions- Specified by:
swapin interfaceCoresLocator- Parameters:
cc- the CoreContainercd1- the core descriptor of the first core, after swappingcd2- the core descriptor of the second core, after swapping
-
discover
Description copied from interface:CoresLocatorLoad all the CoreDescriptors from persistence store- Specified by:
discoverin interfaceCoresLocator- Parameters:
cc- the CoreContainer- Returns:
- a list of all CoreDescriptors found
-
reload
Description copied from interface:CoresLocatorReload a core descriptor.- Specified by:
reloadin interfaceCoresLocator- Parameters:
cd- the old core descriptorcc- the CoreContainer- Returns:
- a new core descriptor
-
buildCoreDescriptor
-
createName
-
buildCoreProperties
-