public class SolrServer extends Object implements org.springframework.context.SmartLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
created
Indicates that Solr was created within this lifecycle and should be stopped.
|
protected boolean |
isWin |
protected SolrProperties |
props |
protected static String |
UNIX_EXT |
protected static String |
WINDOWS_EXT |
| Constructor and Description |
|---|
SolrServer(SolrProperties solrProperties) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCoreStatus() |
protected boolean |
containsDataDirectory(File directory)
Recursively searches the given directory for directories that have /data
|
protected long |
copyLarge(InputStream input,
OutputStream output,
long contentLength) |
protected boolean |
downloadSolrIfApplicable() |
protected boolean |
expandDownload(File downloadFile,
File workingDirectory) |
protected boolean |
expandNix(File downloadFile,
File workingDirectory,
boolean response) |
protected boolean |
expandWin(File downloadFile,
File workingDirectory,
boolean response) |
protected String |
getExtension() |
int |
getPhase() |
protected String |
getSolrCommand() |
protected String |
getWorkingDirectory() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
start() |
protected void |
startSolr() |
void |
stop() |
void |
stop(Runnable runnable) |
protected void |
stopSolr() |
protected boolean |
synchConfig() |
protected final SolrProperties props
protected boolean isWin
protected static final String WINDOWS_EXT
protected static final String UNIX_EXT
protected boolean created
public SolrServer(SolrProperties solrProperties)
public boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void stop(Runnable runnable)
stop in interface org.springframework.context.SmartLifecycleprotected String getWorkingDirectory()
protected String getSolrCommand()
protected void startSolr()
protected void checkCoreStatus()
protected void stopSolr()
protected boolean synchConfig()
protected boolean containsDataDirectory(File directory) throws IOException
IOExceptionprotected boolean downloadSolrIfApplicable()
protected String getExtension()
protected long copyLarge(InputStream input, OutputStream output, long contentLength) throws IOException
IOExceptionCopyright © 2019. All rights reserved.