Package com.jalios.jcms.search
Class IndexSnapshotManager
java.lang.Object
com.jalios.jcms.search.IndexSnapshotManager
Provide management of lucene index snapshot
- Since:
- jcms-10.0.5 / JCMS-8395
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass holding information about pending snapshot -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of file created in a snapshot directory when it is known to be completestatic final StringName of file which can be place inside a snapshot directory when it must not be deleted.static final StringName of directory in WEB-INF/data in which snaphots are stored -
Method Summary
Modifier and TypeMethodDescriptionRequest asynchronous creation of a new snapshot of all search engine.static IndexSnapshotManagerRetrieve the last snapshot directory which is complete.booleanisSnapshotComplete(File snapshotDir) Check if the specified snaphot is complete
-
Field Details
-
SNAPSHOTS_DIRNAME
Name of directory in WEB-INF/data in which snaphots are stored- See Also:
-
SNAPSHOT_COMPLETE_FILENAME
Name of file created in a snapshot directory when it is known to be complete- See Also:
-
SNAPSHOT_DO_NOT_DELETE_FILENAME
Name of file which can be place inside a snapshot directory when it must not be deleted.- See Also:
-
-
Method Details
-
getInstance
-
getLastCompletedSnapshotDirectory
Retrieve the last snapshot directory which is complete.- Returns:
- a File or null if there it no yet any completed snapshot
-
isSnapshotComplete
Check if the specified snaphot is complete- Parameters:
snapshotDir- the directory to check- Returns:
- true if snapshot is complete, false otherwise
-
createSnapshot
Request asynchronous creation of a new snapshot of all search engine. If a snapshot is already in progress request is ignored (but return value is still be valid).- Returns:
- the information about the snapshot in which it will be stored when completed sucessfully
-