Class NoOpIndexMaintainer

    • Method Detail

      • scanUniquenessViolations

        @Nonnull
        public RecordCursor<IndexEntry> scanUniquenessViolations​(@Nonnull
                                                                 TupleRange range,
                                                                 @Nullable
                                                                 byte[] continuation,
                                                                 @Nonnull
                                                                 ScanProperties scanProperties)
        Description copied from class: IndexMaintainer
        Scans through the list of uniqueness violations within the database. It will return a cursor of IndexEntry instances where the getKey() will return the primary key of the record causing a problem and getValue() will return the index value that is being duplicated.
        Specified by:
        scanUniquenessViolations in class IndexMaintainer
        Parameters:
        range - range of tuples to read
        continuation - any continuation from a previous invocation
        scanProperties - row limit and other scan properties
        Returns:
        a cursor that will return primary key-index key pairs indicating uniqueness violations
      • validateEntries

        @Nonnull
        public RecordCursor<InvalidIndexEntry> validateEntries​(@Nullable
                                                               byte[] continuation,
                                                               @Nullable
                                                               ScanProperties scanProperties)
        Description copied from class: IndexMaintainer
        Validates the integrity of the index entries. The definition of exactly what validations are performed is up to the implementation of the index. It is not responsible for metadata validation, which is defined in IndexValidator.
        Specified by:
        validateEntries in class IndexMaintainer
        Parameters:
        continuation - any continuation from a previous validation invocation
        scanProperties - skip, limit and other properties of the validation (use default values if null)
        Returns:
        a cursor over invalid index entries including reasons
      • canEvaluateRecordFunction

        public boolean canEvaluateRecordFunction​(@Nonnull
                                                 IndexRecordFunction<?> function)
        Description copied from class: IndexMaintainer
        Return true if this index be used to evaluate the given record function.
        Specified by:
        canEvaluateRecordFunction in class IndexMaintainer
        Parameters:
        function - requested function
        Returns:
        true if this index can be used to evaluate the given function
      • canEvaluateAggregateFunction

        public boolean canEvaluateAggregateFunction​(@Nonnull
                                                    IndexAggregateFunction function)
        Description copied from class: IndexMaintainer
        Get whether this index can be used to evaluate the given aggregate function.
        Specified by:
        canEvaluateAggregateFunction in class IndexMaintainer
        Parameters:
        function - the requested aggregate function
        Returns:
        true if this index be used to evaluate the given aggregate function
      • isIdempotent

        public boolean isIdempotent()
        Description copied from class: IndexMaintainer
        Whether updating or removing a record on this index is idempotent. In principle, all index updates in the normal case are idempotent as long as the index update and the record insertion or deletion is atomic. However, certain indexes (mostly aggregate indexes) have the property that the index update on its own are not idempotent.
        Specified by:
        isIdempotent in class IndexMaintainer
        Returns:
        whether updating this index is idempotent
      • addedRangeWithKey

        @Nonnull
        public CompletableFuture<Boolean> addedRangeWithKey​(@Nonnull
                                                            Tuple primaryKey)
        Description copied from class: IndexMaintainer
        Whether this key has been added to some range within the RangeSet associated with this index. This is used within the context of seeing if one should update a non-idempotent write-only index with a new key. If the key is in some range, then it means that one should update the index as it is based off of stale data. If the key is not in some range, then it means that one should not update the index, as the rebuild job will handle it later.
        Specified by:
        addedRangeWithKey in class IndexMaintainer
        Parameters:
        primaryKey - the record key of the record to check
        Returns:
        a future that will be true if some range contains the record and false otherwise
      • deleteWhere

        public CompletableFuture<Void> deleteWhere​(Transaction tr,
                                                   @Nonnull
                                                   Tuple prefix)
        Description copied from class: IndexMaintainer
        Clear index storage associated with the given key prefix.
        Specified by:
        deleteWhere in class IndexMaintainer
        Parameters:
        tr - transaction in which to access the database
        prefix - prefix of primary key to clear
        Returns:
        a future that is complete when the given prefix has been cleared from this index