Class SolrServer
java.lang.Object
com.broadleafcommerce.solr.autoconfigure.SolrServer
- All Implemented Interfaces:
org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
- Author:
- Jeff Fischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIndicates that Solr was created within this lifecycle and should be stopped.protected booleanprotected final SolrPropertiesprotected static final Stringprotected static final StringFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected booleancontainsDataDirectory(File directory) Recursively searches the given directory for directories that have /dataprotected voidcopyLarge(InputStream input, OutputStream output, long contentLength) protected booleanprotected booleanexpandDownload(File downloadFile, File workingDirectory) protected booleanintgetPhase()protected Stringprotected Stringbooleanbooleanvoidstart()protected voidvoidstop()voidprotected voidstopSolr()protected boolean
-
Field Details
-
props
-
isWin
protected boolean isWin -
WINDOWS_EXT
- See Also:
-
UNIX_EXT
- See Also:
-
created
protected boolean createdIndicates that Solr was created within this lifecycle and should be stopped. If not started from here, it should also not be stopped from here
-
-
Constructor Details
-
SolrServer
-
-
Method Details
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
stop
- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-
getWorkingDirectory
-
getSolrCommand
-
startSolr
protected void startSolr() -
checkCoreStatus
protected void checkCoreStatus() -
stopSolr
protected void stopSolr() -
syncConfig
protected boolean syncConfig() -
containsDataDirectory
Recursively searches the given directory for directories that have /data- Throws:
IOException
-
downloadSolrIfApplicable
protected boolean downloadSolrIfApplicable() -
expandDownload
-
expandNix
-
copyLarge
protected void copyLarge(InputStream input, OutputStream output, long contentLength) throws IOException - Throws:
IOException
-