Class ChangeIndexRecoverer
- java.lang.Object
-
- com.atlassian.confluence.impl.index.ChangeIndexRecoverer
-
- All Implemented Interfaces:
IndexRecoverer
public class ChangeIndexRecoverer extends Object implements IndexRecoverer
IndexRecoverer for the change index. This class uses setter injection as it is instantiated viaConfluencePluginUtils.instantiatePluginModule(Plugin, Class)but does not implementContainerManagedPluginso autowiring happens by name.- Since:
- 7.9.0
-
-
Constructor Summary
Constructors Constructor Description ChangeIndexRecoverer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreindex()Trigger a reindexvoidreset(@NonNull Runnable replaceIndex)Closes the reader and the writer and create new ones.voidsetChangeLuceneConnection(@NonNull ILuceneConnection changeLuceneConnection)Autowired by spring setter injectionvoidsetFullReindexManager(@NonNull FullReindexManager fullReindexManager)Autowired by spring setter injectionvoidsnapshot(@NonNull File destDir)Allows taking a snapshot of the index.
-
-
-
Method Detail
-
snapshot
public void snapshot(@NonNull File destDir) throws IOException
Description copied from interface:IndexRecovererAllows 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:
snapshotin interfaceIndexRecoverer- Parameters:
destDir- directory in which the snapshot should be saved- Throws:
IOException
-
reset
public void reset(@NonNull Runnable replaceIndex)
Description copied from interface:IndexRecovererCloses the reader and the writer and create new ones.- Specified by:
resetin 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:IndexRecovererTrigger a reindex- Specified by:
reindexin interfaceIndexRecoverer
-
setChangeLuceneConnection
public void setChangeLuceneConnection(@NonNull ILuceneConnection changeLuceneConnection)
Autowired by spring setter injection
-
setFullReindexManager
public void setFullReindexManager(@NonNull FullReindexManager fullReindexManager)
Autowired by spring setter injection
-
-