Interface IComparisonProcessStore


  • public interface IComparisonProcessStore
    A prototype / stub interface for the comparison process store.
    • Method Detail

      • getDirectCorrespondence

        String getDirectCorrespondence​(ComparisonProcessHandle handle,
                                       String source,
                                       ComparisonSide sourceSide,
                                       ComparisonSide targetSide)
        Gets the direct correspondence for the specified symbolic link and direction.
        Parameters:
        handle - the comparison process handle, not null
        source - the source symbolic link, not null
        sourceSide - the source side, not null
        targetSide - the target side, not null
        Returns:
        the direct correspondence on the other side or null
      • getCorrespondences

        Collection<ObjectsTriple<String>> getCorrespondences​(ComparisonProcessHandle handle)
        Returns explicit correspondence and exclusion information as a collection of triple of symbolic links.
        Parameters:
        handle - the comparison process handle, not null
        Returns:
        collection of symbolic link triple
      • setDirectCorrespondence

        void setDirectCorrespondence​(ComparisonProcessHandle handle,
                                     String source,
                                     ComparisonSide sourceSide,
                                     ComparisonSide targetSide,
                                     String target)
        Sets the direct correspondence for the specified symbolic link and direction.
        Parameters:
        handle - the comparison process handle, not null
        source - the source symbolic link, not null
        sourceSide - the source side, not null
        targetSide - the target side, not null
        target - the direct correspondence value to set (may be null
      • getMainSideMatchingStrategy

        MatchingStrategy getMainSideMatchingStrategy​(ComparisonProcessHandle handle)
        Returns the matching strategy for matching objects with the main side of the comparison.
        Parameters:
        handle - the comparison process handle, not null
        Returns:
        the matching strategy for the main side, not null
      • setMainSideMatchingStrategy

        void setMainSideMatchingStrategy​(ComparisonProcessHandle handle,
                                         MatchingStrategy matchingStrategy)
        Sets the matching strategy for matching objects with the main side of the comparison.
        Parameters:
        handle - the comparison process handle, not null
        matchingStrategy - the matching strategy to set, not null
      • cleanCorrespondence

        void cleanCorrespondence​(ComparisonProcessHandle handle,
                                 SymlinkComparisonNode node)
        Cleans (recursively, if required) the correspondence information related to the specified node.
        Parameters:
        handle - the comparison process handle, not null
        node - the comparison result node to clean correspondence information for, not null
      • isExcluded

        boolean isExcluded​(ComparisonProcessHandle handle,
                           String source,
                           ComparisonSide sourceSide,
                           ComparisonSide targetSide)
        Checks if the specified object is explicitly excluded from being matched in the specified direction.
        Parameters:
        handle - the comparison process handle, not null
        source - the object symbolic link, not null
        sourceSide - the source side, not null
        targetSide - the target side, not null
        Returns:
        true if the object is excluded from matching
      • setIsExcluded

        void setIsExcluded​(ComparisonProcessHandle handle,
                           String source,
                           ComparisonSide sourceSide,
                           ComparisonSide targetSide,
                           boolean value)
        Modifies the explicit exclusion flag for matching the specified object in the specified direction.
        Parameters:
        handle - the comparison process handle, not null
        source - the object symbolic link, not null
        sourceSide - the source side, not null
        targetSide - the target side, not null
        value - true to mark the object as excluded, and false to remove the object from exclusion
      • putToComparedObjectCache

        void putToComparedObjectCache​(ComparisonProcessHandle handle,
                                      long nodeBmId,
                                      IComparedObjects<?> comparedObject)
        Puts the specified compared object to the compared object cache.
        Parameters:
        handle - the handle of the comparison process the compared object belongs to
        nodeId - the id of the node for which the compared object is stored
        comparedObject - the compared object, may be null to remove from cache
      • getFromComparedObjectCache

        IComparedObjects<?> getFromComparedObjectCache​(ComparisonProcessHandle handle,
                                                       long nodeBmId)
        Returns the compared object from the cache for the specified node of the specified comparison process.
        Parameters:
        handle - the handle of the comparison process
        nodeId - the identifier of the node
        Returns:
        a compared object or null
      • getNodesMarkedAsChangedByUser

        Set<Long> getNodesMarkedAsChangedByUser​(ComparisonProcessHandle handle)
        Gets comparison nodes marked as changed by user.
        Parameters:
        handle - the handle of the comparison process, not null
        Returns:
        the set of node identifiers marked as changed, may be empty, never null
      • markNodeAsChangedByUser

        void markNodeAsChangedByUser​(ComparisonProcessHandle handle,
                                     long nodeId)
        Marks the comparison node as changed by user.
        Parameters:
        handle - the handle of the comparison process, not null
        nodeId - the comparison node identifier
      • reduceCacheUsageTemporarily

        void reduceCacheUsageTemporarily()
        Reduces the cache usage temporarily (depends on the implementation) to reduce overall resource strain on the system during high-load operations