public class CorePropertiesLocator extends Object implements CoresLocator
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTIES_FILENAME |
| Constructor and Description |
|---|
CorePropertiesLocator(String coreDiscoveryRoot) |
| Modifier and Type | Method and Description |
|---|---|
protected CoreDescriptor |
buildCoreDescriptor(File propertiesFile,
CoreContainer cc) |
protected Properties |
buildCoreProperties(CoreDescriptor cd) |
void |
create(CoreContainer cc,
CoreDescriptor... coreDescriptors)
Make new cores available for discovery
|
protected static String |
createName(Properties p,
File instanceDir) |
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
|
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 PROPERTIES_FILENAME
public CorePropertiesLocator(String coreDiscoveryRoot)
public void create(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocatorcreate in interface CoresLocatorcc - the CoreContainercoreDescriptors - CoreDescriptors to persistpublic void persist(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocatorpersist 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 CoreContainerprotected CoreDescriptor buildCoreDescriptor(File propertiesFile, CoreContainer cc)
protected static String createName(Properties p, File instanceDir)
protected Properties buildCoreProperties(CoreDescriptor cd)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.