Interface VcsModificationsStorage

  • All Known Implementing Classes:
    VcsModificationsStorageImpl

    public interface VcsModificationsStorage
    Low level VCS modifications storage, allows to perform basic operations with VCS modifications, like: persisting, retrieving and deleting.
    • Method Detail

      • getDuplicates

        @NotNull
        Collection<SVcsModification> getDuplicates​(@NotNull
                                                   SVcsModification modification,
                                                   boolean byDisplayVersion)
        Parameters:
        modification - modification to get duplicates for
        byDisplayVersion - if true, comparison will be done not by version, but by displayVersion
        Returns:
      • findModificationsByVersions

        @NotNull
        Map<String,​SVcsModification> findModificationsByVersions​(@NotNull
                                                                       VcsRootInstance root,
                                                                       @NotNull
                                                                       Collection<String> versions)
        For the specified VCS root instance and a set of revisions lookups corresponding SVcsModification instances and returns them as map of revision to the found instance.
        Parameters:
        root - vcs root instance where to perform lookup
        versions - set of versions for which to perform lookup
        Returns:
        map of version to the SVcsModification instance
        Since:
        2018.1
      • findModificationsByDisplayVersion

        @NotNull
        List<SVcsModification> findModificationsByDisplayVersion​(@NotNull
                                                                 String version)
      • loadChangedFiles

        @NotNull
        List<VcsChange> loadChangedFiles​(long modificationId)
      • getAttributes

        @NotNull
        Map<String,​String> getAttributes​(long modificationId)
      • findLastCachedModificationUpTo

        @Nullable
        SVcsModification findLastCachedModificationUpTo​(@NotNull
                                                        VcsRootInstance vcsRoot,
                                                        long upperBoundModificationId)
      • findModificationById

        @Nullable
        SVcsModification findModificationById​(long id)
      • processModifications

        void processModifications​(@NotNull
                                  ItemProcessor<SVcsModification> processor)
        Processes all modifications from newest to oldest
        Parameters:
        processor - callback to call for each modification
      • processModificationsBackwards

        void processModificationsBackwards​(@NotNull
                                           ItemProcessor<SVcsModification> processor)
        Processes all modifications from oldest to newest
        Parameters:
        processor - callback to call for each modification
      • processModificationsBackwards

        void processModificationsBackwards​(@NotNull
                                           ItemProcessor<SVcsModification> processor,
                                           long startModId)
        Processes all modifications from oldest to newest starting from the specified modification id.
        Parameters:
        processor - callback to call for each modification
        startFrom - modification id to start processing from
      • processModifications

        void processModifications​(@NotNull
                                  ItemProcessor<SVcsModification> processor,
                                  long startModId)
        Processes all modifications starting from one with max id less or equal to specified starting point.
        Parameters:
        processor - callback to call for each modification
        startFrom - modification id to start processing from
      • getMinModificationId

        long getMinModificationId()
        Returns:
        minimal cached modification id available at the moment (changes older than this id must not be traversed), or 0 if cache is empty.
      • getMaxModificationId

        long getMaxModificationId()
        Returns:
        maximal cached modification id at the moment, or -1 if cache is empty.
      • updateDescription

        void updateDescription​(long modificationId,
                               @NotNull
                               String value)
      • cleanupExpiredModificationsFromCache

        Set<SVcsModification> cleanupExpiredModificationsFromCache()
        Removes expired modifications from cache.
        Returns:
      • clearCache

        void clearCache()
        Clears the whole modifications cache.
      • isVcsChangesCacheInitialized

        boolean isVcsChangesCacheInitialized()
        Returns:
        true if internal cache of VCS changes is initialized
      • findExpiredModificationsRelatedToBuildType

        @NotNull
        List<SVcsModification> findExpiredModificationsRelatedToBuildType​(@NotNull
                                                                          String buildTypeId,
                                                                          long startModId,
                                                                          int maxChangesToReturn)
      • findExpiredModificationsRelatedToVcsRoot

        @NotNull
        List<SVcsModification> findExpiredModificationsRelatedToVcsRoot​(@NotNull
                                                                        VcsRootInstance vcsRootInstance,
                                                                        long startModId,
                                                                        int maxChangesToReturn)
      • getNumberOfModificationsInCache

        int getNumberOfModificationsInCache()