public final class DefaultSolrCoreState extends SolrCoreState
SolrCoreState.IndexWriterCloser| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
DefaultSolrCoreState(DirectoryFactory directoryFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelRecovery() |
protected SolrIndexWriter |
createMainIndexWriter(SolrCore core,
String name,
boolean removeAllExisting,
boolean forceNewDirectory) |
void |
decref(SolrCoreState.IndexWriterCloser closer)
Decrement the number of references to this state.
|
void |
doRecovery(CoreContainer cc,
String name) |
DirectoryFactory |
getDirectoryFactory() |
RefCounted<IndexWriter> |
getIndexWriter(SolrCore core)
Get the current IndexWriter.
|
void |
incref()
Increment the number of references to this state.
|
void |
newIndexWriter(SolrCore core,
boolean rollback)
Force the creation of a new IndexWriter using the settings from the given
SolrCore.
|
void |
rollbackIndexWriter(SolrCore core)
Rollback the current IndexWriter.
|
getUpdateLockpublic DefaultSolrCoreState(DirectoryFactory directoryFactory)
public RefCounted<IndexWriter> getIndexWriter(SolrCore core) throws IOException
SolrCoreStateSolrCore.getIndexWriter in class SolrCoreStateIOExceptionpublic void newIndexWriter(SolrCore core, boolean rollback) throws IOException
SolrCoreStatenewIndexWriter in class SolrCoreStaterollback - close IndexWriter if false, else rollbackIOExceptionpublic void decref(SolrCoreState.IndexWriterCloser closer)
SolrCoreStatedecref in class SolrCoreStatepublic void incref()
SolrCoreStateincref in class SolrCoreStatepublic void rollbackIndexWriter(SolrCore core) throws IOException
SolrCoreStateSolrCore.rollbackIndexWriter in class SolrCoreStateIOExceptionprotected SolrIndexWriter createMainIndexWriter(SolrCore core, String name, boolean removeAllExisting, boolean forceNewDirectory) throws IOException
IOExceptionpublic DirectoryFactory getDirectoryFactory()
getDirectoryFactory in class SolrCoreStateDirectoryFactory that should be used.public void doRecovery(CoreContainer cc, String name)
doRecovery in class SolrCoreStatepublic void cancelRecovery()
cancelRecovery in class SolrCoreStateCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.