Class IndexVersionOperation
java.lang.Object
org.apache.jackrabbit.oak.indexversion.IndexVersionOperation
- Direct Known Subclasses:
LuceneIndexVersionOperation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
generateIndexVersionOperationList
(NodeState rootNode, String parentPath, List<IndexName> indexNameObjectList, long purgeThresholdMillis) Generate list of index version operation over a list of indexes have same index base.generateIndexVersionOperationList
(NodeState rootNode, String parentPath, List<IndexName> indexNameObjectList, long purgeThresholdMillis, boolean shouldPurgeBaseIndex) Generate list of index version operation over a list of indexes have same index base.protected abstract @Nullable IndexName
getActiveIndex
(List<IndexName> reverseSortedIndexNameList, String parentPath, NodeState rootNode) protected abstract IndexVersionOperation
getIndexVersionOperationInstance
(IndexName indexName) org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation
protected static boolean
isHiddenOakMountExists
(NodeState indexNode) void
setOperation
(org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation operation) toString()
-
Constructor Details
-
IndexVersionOperation
-
-
Method Details
-
setOperation
public void setOperation(org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation operation) -
getOperation
public org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation getOperation() -
getIndexName
-
toString
-
generateIndexVersionOperationList
public List<IndexVersionOperation> generateIndexVersionOperationList(NodeState rootNode, String parentPath, List<IndexName> indexNameObjectList, long purgeThresholdMillis) Generate list of index version operation over a list of indexes have same index base. This will purge base index.- Parameters:
rootNode
- NodeState of rootparentPath
- parent path of baseIndexindexNameObjectList
- This is a list of IndexName Objects with same baseIndexName on which operations will be applied.purgeThresholdMillis
- after which a fully functional index is eligible for purge operations- Returns:
- This method returns an IndexVersionOperation list i.e indexNameObjectList marked with operations
-
generateIndexVersionOperationList
public List<IndexVersionOperation> generateIndexVersionOperationList(NodeState rootNode, String parentPath, List<IndexName> indexNameObjectList, long purgeThresholdMillis, boolean shouldPurgeBaseIndex) Generate list of index version operation over a list of indexes have same index base.- Parameters:
rootNode
- NodeState of rootparentPath
- parent path of baseIndexindexNameObjectList
- This is a list of IndexName Objects with same baseIndexName on which operations will be applied.purgeThresholdMillis
- after which a fully functional index is eligible for purge operationsshouldPurgeBaseIndex
- If set to true, will apply purge operations on active base index i.e. DELETE or DELETE_HIDDEN_AND_DISABLE- Returns:
- This method returns an IndexVersionOperation list i.e indexNameObjectList marked with operations
-
isHiddenOakMountExists
-
getIndexVersionOperationInstance
-
checkIfDisabledIndexCanBeMarkedForDeletion
- Parameters:
indexNode
- - NodeState of a disabled index- Returns:
- true if the disabled index with NodeState indexNode can be marked for deletion or not.
-
getActiveIndex
@Nullable protected abstract @Nullable IndexName getActiveIndex(List<IndexName> reverseSortedIndexNameList, String parentPath, NodeState rootNode) - Parameters:
reverseSortedIndexNameList
-parentPath
-rootNode
-- Returns:
- Highest versioned active index's IndexName
-