public class DefaultSolrServerService extends Object implements SolrServerService
SolrServerService.| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENSION_SOLR_SERVER_RESOURCES_PATH |
static String |
FAIL_ON_ERROR |
static boolean |
FAIL_ON_ERROR_DEFAULT_VALUE |
static String |
INSTANCES_REGEX |
static String |
SOLR_INSTANCES_PATH |
| Constructor and Description |
|---|
DefaultSolrServerService() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
createInstance(SolrInstance solrInstance) |
protected void |
createInstanceConfigDirectory(SolrInstance solrInstance) |
protected void |
createInstanceDataDirectory(SolrInstance solrInstance) |
protected void |
createInstanceLogDirectory(SolrInstance solrInstance) |
SolrInstance |
getInstanceForName(String instanceName)
Returns the configured Solr instance for a given name.
|
Map<String,SolrInstance> |
getInstances()
Returns all configured Solr instances.
|
SolrServerControllerFactory |
getSolrServerControllerFactory() |
protected SolrInstance |
initializeInstance(String instanceName) |
protected void |
initializeInstances() |
protected boolean |
isFailOnError() |
protected void |
replaceInFile(File file,
String regex,
String replacement) |
void |
setSolrServerControllerFactory(SolrServerControllerFactory solrServerControllerFactory) |
void |
startServer(SolrInstance solrInstance)
Starts the Solr server for a given instance.
|
void |
startServers()
Starts all Solr servers that are configured to be automatically started/stopped.
|
void |
stopServer(SolrInstance solrInstance)
Stops the Solr server for a given instance.
|
void |
stopServers()
Stops all Solr servers that are configured to be automatically started/stopped.
|
protected void |
stopServers(List<SolrInstance> solrInstances) |
public static final String SOLR_INSTANCES_PATH
public static final String EXTENSION_SOLR_SERVER_RESOURCES_PATH
public static final String INSTANCES_REGEX
public static final String FAIL_ON_ERROR
public static final boolean FAIL_ON_ERROR_DEFAULT_VALUE
public SolrServerControllerFactory getSolrServerControllerFactory()
public void setSolrServerControllerFactory(SolrServerControllerFactory solrServerControllerFactory)
public Map<String,SolrInstance> getInstances()
SolrServerServicegetInstances in interface SolrServerServicepublic SolrInstance getInstanceForName(String instanceName) throws SolrInstanceNotFoundException
SolrServerServicegetInstanceForName in interface SolrServerServiceinstanceName - - the instance nameSolrInstanceNotFoundException - if an instance is not found for the given namepublic void startServer(SolrInstance solrInstance) throws SolrServerException
SolrServerServicestartServer in interface SolrServerServicesolrInstance - - the Solr instanceSolrServerException - if an error occurs while starting the server.public void stopServer(SolrInstance solrInstance) throws SolrServerException
SolrServerServicestopServer in interface SolrServerServicesolrInstance - - the Solr instanceSolrServerException - if an error occurs while stopping the server.public void startServers()
throws SolrServerException
SolrServerServicestartServers in interface SolrServerServiceSolrServerException - if an error occurs while starting the servers, depending on configuration the errors might be ignored
and the exception not thrownSolrInstance.isAutostart()protected void stopServers(List<SolrInstance> solrInstances) throws SolrServerException
SolrServerExceptionpublic void stopServers()
throws SolrServerException
SolrServerServicestopServers in interface SolrServerServiceSolrServerException - if an error occurs while stopping the servers, depending on configuration the errors might be ignored
and the exception not thrownSolrInstance.isAutostart()public void afterPropertiesSet()
protected void initializeInstances()
protected SolrInstance initializeInstance(String instanceName)
protected void createInstance(SolrInstance solrInstance) throws IOException
IOExceptionprotected void createInstanceConfigDirectory(SolrInstance solrInstance) throws IOException
IOExceptionprotected void createInstanceDataDirectory(SolrInstance solrInstance) throws IOException
IOExceptionprotected void createInstanceLogDirectory(SolrInstance solrInstance) throws IOException
IOExceptionprotected void replaceInFile(File file, String regex, String replacement) throws IOException
IOExceptionprotected boolean isFailOnError()
Copyright © 2017 SAP SE. All Rights Reserved.