public class CorePropertiesLocator extends Object implements CoresLocator
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTIES_FILENAME |
Constructor and Description |
---|
CorePropertiesLocator(Path coreDiscoveryRoot) |
Modifier and Type | Method and Description |
---|---|
protected CoreDescriptor |
buildCoreDescriptor(Path 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,
Path 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(Path coreDiscoveryRoot)
public void create(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocator
create
in interface CoresLocator
cc
- the CoreContainercoreDescriptors
- CoreDescriptors to persistpublic void persist(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocator
persist
in interface CoresLocator
cc
- the CoreContainercoreDescriptors
- CoreDescriptors to persistpublic void delete(CoreContainer cc, CoreDescriptor... coreDescriptors)
CoresLocator
delete
in interface CoresLocator
cc
- the CoreContainercoreDescriptors
- CoreDescriptors of the cores to removepublic void rename(CoreContainer cc, CoreDescriptor oldCD, CoreDescriptor newCD)
CoresLocator
rename
in interface CoresLocator
cc
- the CoreContaineroldCD
- the CoreDescriptor of the core before renamingnewCD
- the CoreDescriptor of the core after renamingpublic void swap(CoreContainer cc, CoreDescriptor cd1, CoreDescriptor cd2)
CoresLocator
swap
in interface CoresLocator
cc
- 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)
CoresLocator
discover
in interface CoresLocator
cc
- the CoreContainerprotected CoreDescriptor buildCoreDescriptor(Path propertiesFile, CoreContainer cc)
protected static String createName(Properties p, Path instanceDir)
protected Properties buildCoreProperties(CoreDescriptor cd)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.