Class AsyncLaneSwitcher
java.lang.Object
org.apache.jackrabbit.oak.plugins.index.importer.AsyncLaneSwitcher
Coordinates the switching of indexing lane for indexes which are
to be imported. Its support idempotent operation i.e. if an
indexer is switched to temp lane then a repeat of same
operation would be no op.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetTempLaneName(String laneName) static booleanisLaneSwitched(NodeBuilder idxBuilder) static booleanisNone(PropertyState previousAsync) static voidrevertSwitch(NodeBuilder idxBuilder, String indexPath) static voidswitchLane(NodeBuilder idxBuilder, String laneName) Make a copy of current async value and replace it with one required for offline reindexing.
-
Constructor Details
-
AsyncLaneSwitcher
public AsyncLaneSwitcher()
-
-
Method Details
-
switchLane
Make a copy of current async value and replace it with one required for offline reindexing. The switch lane operation can be safely repeated: if the index lane is already set to the target lane, the call is a no-op.If
async-previousis present butasyncdoes not already equallaneName, the property is treated as stale (e.g. copied from a running system into a user-provided index definition). In that case the stale value is discarded and the switch proceeds normally so the index is not silently skipped during reindexing. Ifasync-previousis missing, then the switch to the temporary lane required for offline reindexing has not yet happened and will be carried out. -
isLaneSwitched
-
getTempLaneName
-
revertSwitch
-
isNone
-