Class EdgeIndexRecoverer
- java.lang.Object
-
- com.atlassian.confluence.plugins.edgeindex.EdgeIndexRecoverer
-
- All Implemented Interfaces:
IndexRecoverer
public class EdgeIndexRecoverer extends Object implements IndexRecoverer
-
-
Constructor Summary
Constructors Constructor Description EdgeIndexRecoverer(EdgeSearchIndexAccessor edgeSearchIndexAccessor, EdgeIndexBuilder edgeIndexBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
reindex()
Trigger a reindexvoid
reset(@NonNull Runnable replaceIndex)
Closes the reader and the writer and create new ones.void
snapshot(@NonNull File destDir)
Allows taking a snapshot of the index.
-
-
-
Constructor Detail
-
EdgeIndexRecoverer
public EdgeIndexRecoverer(EdgeSearchIndexAccessor edgeSearchIndexAccessor, @Qualifier("edgeIndexBuilder") EdgeIndexBuilder edgeIndexBuilder)
-
-
Method Detail
-
snapshot
public void snapshot(@NonNull File destDir)
Description copied from interface:IndexRecoverer
Allows taking a snapshot of the index.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.
- Specified by:
snapshot
in interfaceIndexRecoverer
- Parameters:
destDir
- directory in which the snapshot should be saved
-
reset
public void reset(@NonNull Runnable replaceIndex)
Description copied from interface:IndexRecoverer
Closes the reader and the writer and create new ones.- Specified by:
reset
in interfaceIndexRecoverer
- Parameters:
replaceIndex
- method that should be executed before the index has been closed and before the index has been reopened
-
reindex
public void reindex()
Description copied from interface:IndexRecoverer
Trigger a reindex- Specified by:
reindex
in interfaceIndexRecoverer
-
-