Package jetbrains.buildServer.vcs
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 Summary
-
-
-
Method Detail
-
getDuplicates
@NotNull Collection<SVcsModification> getDuplicates(@NotNull SVcsModification modification, boolean byDisplayVersion)
- Parameters:
modification
- modification to get duplicates forbyDisplayVersion
- if true, comparison will be done not by version, but by displayVersion- Returns:
-
getModificationsWithSameVersion
@NotNull Collection<SVcsModification> getModificationsWithSameVersion(@NotNull VcsRootInstance root, @NotNull String modificationVcsVersion)
-
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 lookupversions
- set of versions for which to perform lookup- Returns:
- map of version to the SVcsModification instance
- Since:
- 2018.1
-
findModificationsByVersion
@NotNull List<SVcsModification> findModificationsByVersion(@NotNull String version)
-
findModificationsByDisplayVersion
@NotNull List<SVcsModification> findModificationsByDisplayVersion(@NotNull String version)
-
loadChangedFiles
@NotNull Map<Long,List<VcsChange>> loadChangedFiles(@NotNull Set<Long> modificationIds)
-
findLastModification
@Nullable SVcsModification findLastModification(@NotNull LVcsRootInstance vcsRoot)
-
findLastCachedModificationUpTo
@Nullable SVcsModification findLastCachedModificationUpTo(@NotNull VcsRootInstance vcsRoot, long upperBoundModificationId)
-
findFirstCachedModification
@Nullable SVcsModification findFirstCachedModification(@NotNull VcsRootInstance vcsRoot)
-
findModificationsByUsername
@NotNull List<SVcsModification> findModificationsByUsername(@NotNull String userName)
-
findModificationsByIds
@NotNull Collection<SVcsModification> findModificationsByIds(@NotNull Collection<Long> modificationIds)
-
findModificationById
@Nullable SVcsModification findModificationById(long id)
-
findCached
@Nullable SVcsModification findCached(long id)
-
getAllModifications
@NotNull List<SVcsModification> getAllModifications()
-
getAllModificationsSince
@NotNull List<SVcsModification> getAllModificationsSince(@NotNull Date sinceDate)
-
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 modificationstartFrom
- 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 modificationstartFrom
- 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.
-
persistModification
@NotNull SVcsModification persistModification(long id, @NotNull ModificationData modificationData, @NotNull Collection<SBuildType> relatedConfigurations, @NotNull Map<String,RelationType> changeTypes, @NotNull List<Map<String,RelationType>> edgeRelations, @NotNull Date registrationDate)
-
updateModificationRelatedConfigurations
void updateModificationRelatedConfigurations(@NotNull SVcsModification modification, @NotNull Map<String,RelationType> changeTypes)
-
addEdgeRelations
void addEdgeRelations(@NotNull SVcsModification modification, @NotNull List<Map<String,RelationType>> newEdgeRelations)
-
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
-
getModificationRelations
@NotNull RelatedConfigurations getModificationRelations(@NotNull SVcsModification modification)
-
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()
-
-