Class CorePropertiesLocator

  • All Implemented Interfaces:
    CoresLocator

    public class CorePropertiesLocator
    extends Object
    implements CoresLocator
    Persists CoreDescriptors as properties files
    • Constructor Detail

      • CorePropertiesLocator

        public CorePropertiesLocator​(Path coreDiscoveryRoot)
    • Method Detail

      • create

        public void create​(CoreContainer cc,
                           CoreDescriptor... coreDescriptors)
        Description copied from interface: CoresLocator
        Make new cores available for discovery
        Specified by:
        create in interface CoresLocator
        Parameters:
        cc - the CoreContainer
        coreDescriptors - CoreDescriptors to persist
      • persist

        public void persist​(CoreContainer cc,
                            CoreDescriptor... coreDescriptors)
        Description copied from interface: CoresLocator
        Ensure that the core definitions from the passed in CoreDescriptors will persist across container restarts.
        Specified by:
        persist in interface CoresLocator
        Parameters:
        cc - the CoreContainer
        coreDescriptors - CoreDescriptors to persist
      • delete

        public void delete​(CoreContainer cc,
                           CoreDescriptor... coreDescriptors)
        Description copied from interface: CoresLocator
        Ensure that the core definitions from the passed in CoreDescriptors are not available for discovery
        Specified by:
        delete in interface CoresLocator
        Parameters:
        cc - the CoreContainer
        coreDescriptors - CoreDescriptors of the cores to remove
      • rename

        public void rename​(CoreContainer cc,
                           CoreDescriptor oldCD,
                           CoreDescriptor newCD)
        Description copied from interface: CoresLocator
        Persist the new name of a renamed core
        Specified by:
        rename in interface CoresLocator
        Parameters:
        cc - the CoreContainer
        oldCD - the CoreDescriptor of the core before renaming
        newCD - the CoreDescriptor of the core after renaming
      • swap

        public void swap​(CoreContainer cc,
                         CoreDescriptor cd1,
                         CoreDescriptor cd2)
        Description copied from interface: CoresLocator
        Swap two core definitions
        Specified by:
        swap in interface CoresLocator
        Parameters:
        cc - the CoreContainer
        cd1 - the core descriptor of the first core, after swapping
        cd2 - the core descriptor of the second core, after swapping