Class IndexVersionOperation
- java.lang.Object
-
- org.apache.jackrabbit.oak.indexversion.IndexVersionOperation
-
- Direct Known Subclasses:
LuceneIndexVersionOperation
public abstract class IndexVersionOperation extends Object
-
-
Constructor Summary
Constructors Constructor Description IndexVersionOperation(IndexName indexName)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
checkIfDisabledIndexCanBeMarkedForDeletion(NodeState indexNode)
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.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.protected abstract @Nullable IndexName
getActiveIndex(List<IndexName> reverseSortedIndexNameList, String parentPath, NodeState rootNode)
IndexName
getIndexName()
protected abstract IndexVersionOperation
getIndexVersionOperationInstance(IndexName indexName)
org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation
getOperation()
protected static boolean
isHiddenOakMountExists(NodeState indexNode)
void
setOperation(org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation operation)
String
toString()
-
-
-
Constructor Detail
-
IndexVersionOperation
public IndexVersionOperation(IndexName indexName)
-
-
Method Detail
-
setOperation
public void setOperation(org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation operation)
-
getOperation
public org.apache.jackrabbit.oak.indexversion.IndexVersionOperation.Operation getOperation()
-
getIndexName
public IndexName getIndexName()
-
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
protected static boolean isHiddenOakMountExists(NodeState indexNode)
-
getIndexVersionOperationInstance
protected abstract IndexVersionOperation getIndexVersionOperationInstance(IndexName indexName)
-
checkIfDisabledIndexCanBeMarkedForDeletion
protected abstract boolean checkIfDisabledIndexCanBeMarkedForDeletion(NodeState indexNode)
- Parameters:
indexNode
- - NodeState of a disabled index- Returns:
- true if the disabled index with NodeState indexNode can be marked for deletion or not.
-
-