public class SolrXMLCoresLocator extends Object implements CoresLocator
| Modifier and Type | Class and Description |
|---|---|
static class |
SolrXMLCoresLocator.NonPersistingLocator |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CORE_NAME
Core name to use if a core definition has no name
|
static String |
INDENT |
static String |
NEWLINE |
| Constructor and Description |
|---|
SolrXMLCoresLocator(String originalXML,
ConfigSolrXmlOld cfg)
Create a new SolrXMLCoresLocator
|
| Modifier and Type | Method and Description |
|---|---|
protected static String |
buildCoreTag(CoreDescriptor cd)
Serialize a coredescriptor as a String containing an XML <core> tag.
|
protected String |
buildSolrXML(List<CoreDescriptor> cds) |
void |
create(CoreContainer cc,
CoreDescriptor... coreDescriptors)
Make new cores available for discovery
|
void |
delete(CoreContainer cc,
CoreDescriptor... coreDescriptors)
Ensure that the core definitions from the passed in CoreDescriptors
are not available for discovery
|
List<CoreDescriptor> |
discover(CoreContainer cc)
Load all the CoreDescriptors from persistence store
|
protected void |
doPersist(String xml) |
void |
persist(CoreContainer cc,
CoreDescriptor... coreDescriptors)
Ensure that the core definitions from the passed in CoreDescriptors
will persist across container restarts.
|
void |
rename(CoreContainer cc,
CoreDescriptor oldCD,
CoreDescriptor newCD)
Persist the new name of a renamed core
|
void |
swap(CoreContainer cc,
CoreDescriptor cd1,
CoreDescriptor cd2)
Swap two core definitions
|
public static final String DEFAULT_CORE_NAME
public static final String NEWLINE
public static final String INDENT
public SolrXMLCoresLocator(String originalXML, ConfigSolrXmlOld cfg)
originalXML - the original content of the solr.xml filecfg - the CoreContainer's config objectprotected String buildSolrXML(List<CoreDescriptor> cds)
protected static String buildCoreTag(CoreDescriptor cd)
cd - the CoreDescriptorpublic final void persist(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocatorpersist in interface CoresLocatorcc - the CoreContainercoreDescriptors - CoreDescriptors to persistprotected void doPersist(String xml)
public void create(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocatorcreate in interface CoresLocatorcc - the CoreContainercoreDescriptors - CoreDescriptors to persistpublic void delete(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocatordelete in interface CoresLocatorcc - the CoreContainercoreDescriptors - CoreDescriptors of the cores to removepublic void rename(CoreContainer cc, CoreDescriptor oldCD, CoreDescriptor newCD)
CoresLocatorrename in interface CoresLocatorcc - the CoreContaineroldCD - the CoreDescriptor of the core before renamingnewCD - the CoreDescriptor of the core after renamingpublic void swap(CoreContainer cc, CoreDescriptor cd1, CoreDescriptor cd2)
CoresLocatorswap in interface CoresLocatorcc - the CoreContainercd1 - the core descriptor of the first core, after swappingcd2 - the core descriptor of the second core, after swappingpublic List<CoreDescriptor> discover(CoreContainer cc)
CoresLocatordiscover in interface CoresLocatorcc - the CoreContainerCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.