public final class DefaultSolrCoreState extends SolrCoreState implements RecoveryStrategy.RecoveryListener
SolrCoreState.IndexWriterCloser| Modifier and Type | Field and Description |
|---|---|
protected ReentrantLock |
commitLock |
static org.slf4j.Logger |
log |
closed| Constructor and Description |
|---|
DefaultSolrCoreState(DirectoryFactory directoryFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelRecovery() |
void |
close(SolrCoreState.IndexWriterCloser closer) |
void |
closeIndexWriter(SolrCore core,
boolean rollback)
Expert method that closes the IndexWriter - you must call
SolrCoreState.openIndexWriter(SolrCore)
in a finally block after calling this method. |
protected SolrIndexWriter |
createMainIndexWriter(SolrCore core,
String name) |
void |
doRecovery(CoreContainer cc,
CoreDescriptor cd) |
void |
failed() |
Lock |
getCommitLock() |
DirectoryFactory |
getDirectoryFactory() |
RefCounted<IndexWriter> |
getIndexWriter(SolrCore core)
Get the current IndexWriter.
|
ActionThrottle |
getLeaderThrottle() |
void |
newIndexWriter(SolrCore core,
boolean rollback)
Force the creation of a new IndexWriter using the settings from the given
SolrCore.
|
void |
openIndexWriter(SolrCore core)
Expert method that opens the IndexWriter - you must call
SolrCoreState.closeIndexWriter(SolrCore, boolean)
first, and then call this method in a finally block. |
void |
recovered() |
void |
rollbackIndexWriter(SolrCore core)
Rollback the current IndexWriter.
|
decrefSolrCoreState, getUpdateLock, increfSolrCoreStatepublic static org.slf4j.Logger log
protected final ReentrantLock commitLock
public DefaultSolrCoreState(DirectoryFactory directoryFactory)
public RefCounted<IndexWriter> getIndexWriter(SolrCore core) throws IOException
SolrCoreStateSolrCore.getIndexWriter in class SolrCoreStateIOException - If there is a low-level I/O error.public void newIndexWriter(SolrCore core, boolean rollback) throws IOException
SolrCoreStatenewIndexWriter in class SolrCoreStaterollback - close IndexWriter if false, else rollbackIOException - If there is a low-level I/O error.public void closeIndexWriter(SolrCore core, boolean rollback) throws IOException
SolrCoreStateSolrCoreState.openIndexWriter(SolrCore)
in a finally block after calling this method.closeIndexWriter in class SolrCoreStatecore - that the IW belongs torollback - true if IW should rollback rather than closeIOException - If there is a low-level I/O error.public void openIndexWriter(SolrCore core) throws IOException
SolrCoreStateSolrCoreState.closeIndexWriter(SolrCore, boolean)
first, and then call this method in a finally block.openIndexWriter in class SolrCoreStatecore - that the IW belongs toIOException - If there is a low-level I/O error.public void rollbackIndexWriter(SolrCore core) throws IOException
SolrCoreStateSolrCore.rollbackIndexWriter in class SolrCoreStateIOException - If there is a low-level I/O error.protected SolrIndexWriter createMainIndexWriter(SolrCore core, String name) throws IOException
IOExceptionpublic DirectoryFactory getDirectoryFactory()
getDirectoryFactory in class SolrCoreStateDirectoryFactory that should be used.public void doRecovery(CoreContainer cc, CoreDescriptor cd)
doRecovery in class SolrCoreStatepublic void cancelRecovery()
cancelRecovery in class SolrCoreStatepublic void recovered()
recovered in interface RecoveryStrategy.RecoveryListenerpublic void failed()
failed in interface RecoveryStrategy.RecoveryListenerpublic void close(SolrCoreState.IndexWriterCloser closer)
close in class SolrCoreStatepublic Lock getCommitLock()
getCommitLock in class SolrCoreStatepublic ActionThrottle getLeaderThrottle()
getLeaderThrottle in class SolrCoreStateCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.