public final class DefaultSolrCoreState extends SolrCoreState implements RecoveryStrategy.RecoveryListener
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 forceNewDirectory) |
void |
decref(SolrCoreState.IndexWriterCloser closer)
Decrement the number of references to this state.
|
void |
doRecovery(CoreContainer cc,
String name) |
void |
failed() |
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 |
recovered() |
void |
rollbackIndexWriter(SolrCore core)
Rollback the current IndexWriter.
|
getUpdateLock
public DefaultSolrCoreState(DirectoryFactory directoryFactory)
public RefCounted<IndexWriter> getIndexWriter(SolrCore core) throws IOException
SolrCoreState
SolrCore
.getIndexWriter
in class SolrCoreState
IOException
- If there is a low-level I/O error.public void newIndexWriter(SolrCore core, boolean rollback) throws IOException
SolrCoreState
newIndexWriter
in class SolrCoreState
rollback
- close IndexWriter if false, else rollbackIOException
- If there is a low-level I/O error.public void decref(SolrCoreState.IndexWriterCloser closer)
SolrCoreState
decref
in class SolrCoreState
public void incref()
SolrCoreState
incref
in class SolrCoreState
public void rollbackIndexWriter(SolrCore core) throws IOException
SolrCoreState
SolrCore
.rollbackIndexWriter
in class SolrCoreState
IOException
- If there is a low-level I/O error.protected SolrIndexWriter createMainIndexWriter(SolrCore core, String name, boolean forceNewDirectory) throws IOException
IOException
public DirectoryFactory getDirectoryFactory()
getDirectoryFactory
in class SolrCoreState
DirectoryFactory
that should be used.public void doRecovery(CoreContainer cc, String name)
doRecovery
in class SolrCoreState
public void cancelRecovery()
cancelRecovery
in class SolrCoreState
public void recovered()
recovered
in interface RecoveryStrategy.RecoveryListener
public void failed()
failed
in interface RecoveryStrategy.RecoveryListener
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.