org.apache.solr.core
Class CorePropertiesLocator

java.lang.Object
  extended by org.apache.solr.core.CorePropertiesLocator
All Implemented Interfaces:
CoresLocator

public class CorePropertiesLocator
extends Object
implements CoresLocator

Persists CoreDescriptors as properties files


Field Summary
static String PROPERTIES_FILENAME
           
 
Constructor Summary
CorePropertiesLocator(String coreDiscoveryRoot)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_FILENAME

public static final String PROPERTIES_FILENAME
See Also:
Constant Field Values
Constructor Detail

CorePropertiesLocator

public CorePropertiesLocator(String 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

discover

public List<CoreDescriptor> discover(CoreContainer cc)
Description copied from interface: CoresLocator
Load all the CoreDescriptors from persistence store

Specified by:
discover in interface CoresLocator
Parameters:
cc - the CoreContainer
Returns:
a list of all CoreDescriptors found

buildCoreDescriptor

protected CoreDescriptor buildCoreDescriptor(File propertiesFile,
                                             CoreContainer cc)

createName

protected static String createName(Properties p,
                                   File instanceDir)

buildCoreProperties

protected Properties buildCoreProperties(CoreDescriptor cd)


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.