Class IndexVersionOperation

    • 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()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • generateIndexVersionOperationList

        public java.util.List<IndexVersionOperation> generateIndexVersionOperationList​(NodeState rootNode,
                                                                                       java.lang.String parentPath,
                                                                                       java.util.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 root
        parentPath - parent path of baseIndex
        indexNameObjectList - 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 java.util.List<IndexVersionOperation> generateIndexVersionOperationList​(NodeState rootNode,
                                                                                       java.lang.String parentPath,
                                                                                       java.util.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 root
        parentPath - parent path of baseIndex
        indexNameObjectList - 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
        shouldPurgeBaseIndex - 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)
      • 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.
      • getActiveIndex

        @Nullable
        protected abstract @Nullable IndexName getActiveIndex​(java.util.List<IndexName> reverseSortedIndexNameList,
                                                              java.lang.String parentPath,
                                                              NodeState rootNode)
        Parameters:
        reverseSortedIndexNameList -
        parentPath -
        rootNode -
        Returns:
        Highest versioned active index's IndexName