public abstract class SolrCoreState extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
SolrCoreState.IndexWriterCloser |
Modifier and Type | Field and Description |
---|---|
protected boolean |
closed |
static org.slf4j.Logger |
log |
Constructor and Description |
---|
SolrCoreState() |
Modifier and Type | Method and Description |
---|---|
abstract void |
cancelRecovery() |
abstract void |
close(SolrCoreState.IndexWriterCloser closer) |
abstract void |
closeIndexWriter(SolrCore core,
boolean rollback)
Expert method that closes the IndexWriter - you must call
openIndexWriter(SolrCore)
in a finally block after calling this method. |
boolean |
decrefSolrCoreState(SolrCoreState.IndexWriterCloser closer) |
abstract void |
doRecovery(CoreContainer cc,
CoreDescriptor cd) |
abstract Lock |
getCommitLock() |
abstract DirectoryFactory |
getDirectoryFactory() |
abstract RefCounted<IndexWriter> |
getIndexWriter(SolrCore core)
Get the current IndexWriter.
|
Object |
getUpdateLock() |
void |
increfSolrCoreState() |
abstract void |
newIndexWriter(SolrCore core,
boolean rollback)
Force the creation of a new IndexWriter using the settings from the given
SolrCore.
|
abstract void |
openIndexWriter(SolrCore core)
Expert method that opens the IndexWriter - you must call
closeIndexWriter(SolrCore, boolean)
first, and then call this method in a finally block. |
abstract void |
rollbackIndexWriter(SolrCore core)
Rollback the current IndexWriter.
|
public Object getUpdateLock()
public void increfSolrCoreState()
public boolean decrefSolrCoreState(SolrCoreState.IndexWriterCloser closer)
public abstract Lock getCommitLock()
public abstract void newIndexWriter(SolrCore core, boolean rollback) throws IOException
rollback
- close IndexWriter if false, else rollbackIOException
- If there is a low-level I/O error.public abstract void closeIndexWriter(SolrCore core, boolean rollback) throws IOException
openIndexWriter(SolrCore)
in a finally block after calling this method.core
- that the IW belongs torollback
- true if IW should rollback rather than closeIOException
- If there is a low-level I/O error.public abstract void openIndexWriter(SolrCore core) throws IOException
closeIndexWriter(SolrCore, boolean)
first, and then call this method in a finally block.core
- that the IW belongs toIOException
- If there is a low-level I/O error.public abstract RefCounted<IndexWriter> getIndexWriter(SolrCore core) throws IOException
SolrCore
.IOException
- If there is a low-level I/O error.public abstract void rollbackIndexWriter(SolrCore core) throws IOException
SolrCore
.IOException
- If there is a low-level I/O error.public abstract DirectoryFactory getDirectoryFactory()
DirectoryFactory
that should be used.public abstract void doRecovery(CoreContainer cc, CoreDescriptor cd)
public abstract void cancelRecovery()
public abstract void close(SolrCoreState.IndexWriterCloser closer)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.