public final class DefaultSolrCoreState extends SolrCoreState implements RecoveryStrategy.RecoveryListener
SolrCoreState.CoreIsClosedException, SolrCoreState.IndexWriterCloser
Modifier and Type | Field and Description |
---|---|
protected ReentrantLock |
commitLock |
closed
Constructor and Description |
---|
DefaultSolrCoreState(DirectoryFactory directoryFactory)
Deprecated.
|
DefaultSolrCoreState(DirectoryFactory directoryFactory,
RecoveryStrategy.Builder recoveryStrategyBuilder) |
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()
called from recoveryStrat on a failed recovery
|
Callable |
getCdcrBootstrapCallable() |
Future<Boolean> |
getCdcrBootstrapFuture() |
boolean |
getCdcrBootstrapRunning() |
Lock |
getCommitLock() |
DirectoryFactory |
getDirectoryFactory() |
RefCounted<IndexWriter> |
getIndexWriter(SolrCore core)
Get the current IndexWriter.
|
boolean |
getLastReplicateIndexSuccess() |
ActionThrottle |
getLeaderThrottle() |
Sort |
getMergePolicySort()
Get the current Sort of the current IndexWriter's MergePolicy..
|
Lock |
getRecoveryLock() |
RecoveryStrategy.Builder |
getRecoveryStrategyBuilder() |
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()
called from recoveryStrat on a successful recovery
|
void |
rollbackIndexWriter(SolrCore core)
Rollback the current IndexWriter.
|
void |
setCdcrBootstrapCallable(Callable cdcrBootstrapCallable) |
void |
setCdcrBootstrapFuture(Future<Boolean> cdcrBootstrapFuture) |
void |
setCdcrBootstrapRunning(boolean cdcrRunning) |
void |
setLastReplicateIndexSuccess(boolean success) |
decrefSolrCoreState, getReloadLock, getTragicException, getUpdateLock, increfSolrCoreState
protected final ReentrantLock commitLock
@Deprecated public DefaultSolrCoreState(DirectoryFactory directoryFactory)
public DefaultSolrCoreState(DirectoryFactory directoryFactory, RecoveryStrategy.Builder recoveryStrategyBuilder)
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 closeIndexWriter(SolrCore core, boolean rollback) throws IOException
SolrCoreState
SolrCoreState.openIndexWriter(SolrCore)
in a finally block after calling this method.closeIndexWriter
in class SolrCoreState
core
- 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
SolrCoreState
SolrCoreState.closeIndexWriter(SolrCore, boolean)
first, and then call this method in a finally block.openIndexWriter
in class SolrCoreState
core
- that the IW belongs toIOException
- If there is a low-level I/O error.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) throws IOException
IOException
public Sort getMergePolicySort() throws IOException
SolrCoreState
getMergePolicySort
in class SolrCoreState
IOException
- If there is a low-level I/O error.public DirectoryFactory getDirectoryFactory()
getDirectoryFactory
in class SolrCoreState
DirectoryFactory
that should be used.public RecoveryStrategy.Builder getRecoveryStrategyBuilder()
getRecoveryStrategyBuilder
in class SolrCoreState
RecoveryStrategy.Builder
that should be used.public void doRecovery(CoreContainer cc, CoreDescriptor cd)
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
public void close(SolrCoreState.IndexWriterCloser closer)
close
in class SolrCoreState
public Lock getCommitLock()
getCommitLock
in class SolrCoreState
public ActionThrottle getLeaderThrottle()
getLeaderThrottle
in class SolrCoreState
public boolean getLastReplicateIndexSuccess()
getLastReplicateIndexSuccess
in class SolrCoreState
public void setLastReplicateIndexSuccess(boolean success)
setLastReplicateIndexSuccess
in class SolrCoreState
public Lock getRecoveryLock()
getRecoveryLock
in class SolrCoreState
public boolean getCdcrBootstrapRunning()
getCdcrBootstrapRunning
in class SolrCoreState
public void setCdcrBootstrapRunning(boolean cdcrRunning)
setCdcrBootstrapRunning
in class SolrCoreState
public Future<Boolean> getCdcrBootstrapFuture()
getCdcrBootstrapFuture
in class SolrCoreState
public void setCdcrBootstrapFuture(Future<Boolean> cdcrBootstrapFuture)
setCdcrBootstrapFuture
in class SolrCoreState
public Callable getCdcrBootstrapCallable()
getCdcrBootstrapCallable
in class SolrCoreState
public void setCdcrBootstrapCallable(Callable cdcrBootstrapCallable)
setCdcrBootstrapCallable
in class SolrCoreState
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.