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.Lifecycle
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
getPhase
in interface org.springframework.context.SmartLifecycle
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(Runnable runnable)
stop
in interface org.springframework.context.SmartLifecycle
protected String getWorkingDirectory()
protected String getSolrCommand()
protected void startSolr()
protected void checkCoreStatus()
protected void stopSolr()
protected boolean synchConfig()
protected boolean containsDataDirectory(File directory) throws IOException
IOException
protected boolean downloadSolrIfApplicable()
protected String getExtension()
protected long copyLarge(InputStream input, OutputStream output, long contentLength) throws IOException
IOException
Copyright © 2020. All rights reserved.