public class MainIndexRecoverer extends Object implements IndexRecoverer
Constructor and Description |
---|
MainIndexRecoverer() |
Modifier and Type | Method and Description |
---|---|
void |
reindex()
Trigger a reindex
|
void |
reset(@NonNull Runnable replaceIndex)
Closes the reader and the writer and create new ones.
|
void |
setIndexManager(IndexManager indexManager) |
void |
setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection) |
void |
snapshot(@NonNull File destDir)
Allows taking a snapshot of the index.
|
public void snapshot(@NonNull File destDir) throws IOException
IndexRecoverer
The snapshot should be taken in a safe way to prevent any write while it is copying index files over to the destination directory. Suggestions include to use LuceneConnection#snapshot(Directory) method or alternatively to take the snapshot with SnapshotDeletionPolicy.
snapshot
in interface IndexRecoverer
destDir
- directory in which the snapshot should be savedIOException
public void reset(@NonNull Runnable replaceIndex)
IndexRecoverer
reset
in interface IndexRecoverer
replaceIndex
- method that should be executed before the index has been closed and before the index has been reopenedpublic void reindex()
IndexRecoverer
reindex
in interface IndexRecoverer
public void setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection)
public void setIndexManager(IndexManager indexManager)
Copyright © 2003–2020 Atlassian. All rights reserved.