Package jetbrains.buildServer.vcs
Interface ChangesLoaderContext
-
- All Known Implementing Classes:
BuildChangesLoaderContext
,NarrowBuildTypesDecorator
,PeriodicChangesLoaderContext
public interface ChangesLoaderContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ChangesLoaderContext.OperationRejectedReason
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<? extends LVcsRootInstance>
getBuildTypeVcsRoots(LVcsRootInstanceHolder buildType)
BuildTypeChangeRelationCalculator
getChangeRelationCalculator()
VcsChangesLoaderCallback
getChangesLoaderCallback()
Set<BranchSpec>
getCurrentSettingsBranchSpecs(LVcsRootInstance root)
Returns branch specs for the specified VCS root as for settings root.ChangesCollectionLogger
getLogger()
Logger for changes collecting processdefault ChangesLoaderContext.OperationRejectedReason
getOperationRejectedReason()
Returns a reason of a rejected checking for changes operation in one of the VCS roots.Set<BranchSpec>
getPrevSettingsBranchSpecs(LVcsRootInstance root)
Returns previous branch specs used for changes collecting in the specified VCS root as in versioned settings root.List<VcsRootVcsException>
getReportedProblems()
OperationRequestor
getRequestor()
Date
getRequestTimestamp()
Map<? extends LVcsRootInstanceHolder,CheckoutRules>
getSettingRootUsages(LVcsRootInstance root)
Returns all usages of the specified settings VCS root, including the buildTypes where settings root is attachedMap<? extends LVcsRootInstanceHolder,CheckoutRules>
getUsagesForChangePersisting(ModificationData modificationData)
Map<? extends LVcsRootInstanceHolder,CheckoutRules>
getUsagesForChangesCollecting(LVcsRootInstance vcsRootInstance)
VcsChangesLoaderMetrics
getVcsChangesLoaderMetrics()
String
getVersionedSettingsContentDir()
default String
getVersionedSettingsRule(LVcsRootInstance root)
boolean
hasCustomSettings(LVcsRootInstanceHolder buildType, LVcsRootInstance root, CheckoutRules rules)
Returns true if the specified root or checkout rules are different from the one attached to the given buildTypeboolean
isCanceled()
boolean
isImplicitSettingsVcsRoot(LVcsRootInstanceHolder buildType, LVcsRootInstance root)
default boolean
isRecoverableError(VcsException e)
boolean
isSettingsVcsRoot(LVcsRootInstanceHolder buildType, LVcsRootInstance root)
Returns true if the specified VCS root used to store settings in the given buildTypeboolean
isSettingsVcsRoot(LVcsRootInstance root)
Returns true if the specified VCS root is used for storing versioned settings.boolean
performVcsOperationsInCurrentThread()
if true, all VCS-related operations will be performed in the same thread, otherwise, changes loader will try to split tasks among other threads if possibleboolean
saveSettingsBranchSpecs(LVcsRootInstance root)
Saves branch specs of the specified VCS root previously returned by the getCurrentSettingsBranchSpecs() method, so that the subsequent call to getPrevSettingsBranchSpecs() returns them.default boolean
shouldCollectChangesForVcsRoot(LVcsRootInstance root, RepositoryState currentState)
boolean
shouldWaitForChangesCollectionFinishing(LVcsRootInstance inst)
-
-
-
Method Detail
-
isCanceled
boolean isCanceled()
- Returns:
- true if
ChangesLoaderContext
task was canceled - Since:
- 7.1.1
-
getUsagesForChangesCollecting
@NotNull Map<? extends LVcsRootInstanceHolder,CheckoutRules> getUsagesForChangesCollecting(@NotNull LVcsRootInstance vcsRootInstance)
-
getUsagesForChangePersisting
@NotNull Map<? extends LVcsRootInstanceHolder,CheckoutRules> getUsagesForChangePersisting(@NotNull ModificationData modificationData)
-
getSettingRootUsages
@NotNull Map<? extends LVcsRootInstanceHolder,CheckoutRules> getSettingRootUsages(@NotNull LVcsRootInstance root)
Returns all usages of the specified settings VCS root, including the buildTypes where settings root is attached- Parameters:
root
- settings VCS root of interest- Returns:
- see above
-
getBuildTypeVcsRoots
@NotNull List<? extends LVcsRootInstance> getBuildTypeVcsRoots(@NotNull LVcsRootInstanceHolder buildType)
-
getChangesLoaderCallback
@NotNull VcsChangesLoaderCallback getChangesLoaderCallback()
-
performVcsOperationsInCurrentThread
boolean performVcsOperationsInCurrentThread()
if true, all VCS-related operations will be performed in the same thread, otherwise, changes loader will try to split tasks among other threads if possible
-
getLogger
@NotNull ChangesCollectionLogger getLogger()
Logger for changes collecting process
-
getChangeRelationCalculator
@NotNull BuildTypeChangeRelationCalculator getChangeRelationCalculator()
-
isSettingsVcsRoot
boolean isSettingsVcsRoot(@NotNull LVcsRootInstance root)
Returns true if the specified VCS root is used for storing versioned settings. The root should be one of the roots for which changes are collected.- Parameters:
root
- VCS root of interest- Returns:
- see above
-
isSettingsVcsRoot
boolean isSettingsVcsRoot(@NotNull LVcsRootInstanceHolder buildType, @NotNull LVcsRootInstance root)
Returns true if the specified VCS root used to store settings in the given buildType- Parameters:
buildType
- buildType of interestroot
- VCS root of interest- Returns:
- see above
-
isImplicitSettingsVcsRoot
boolean isImplicitSettingsVcsRoot(@NotNull LVcsRootInstanceHolder buildType, @NotNull LVcsRootInstance root)
-
getVersionedSettingsContentDir
@NotNull String getVersionedSettingsContentDir()
-
getVersionedSettingsRule
@NotNull default String getVersionedSettingsRule(@NotNull LVcsRootInstance root)
-
getRequestor
@NotNull OperationRequestor getRequestor()
-
getRequestTimestamp
@NotNull Date getRequestTimestamp()
-
getPrevSettingsBranchSpecs
@NotNull Set<BranchSpec> getPrevSettingsBranchSpecs(@NotNull LVcsRootInstance root)
Returns previous branch specs used for changes collecting in the specified VCS root as in versioned settings root. If root is not used for storing settings, then empty set is returned.- Parameters:
root
- VCS root of interest- Returns:
- see above
-
getCurrentSettingsBranchSpecs
@NotNull Set<BranchSpec> getCurrentSettingsBranchSpecs(@NotNull LVcsRootInstance root)
Returns branch specs for the specified VCS root as for settings root. If root is not used for storing settings, then empty set is returned. The implementation saves the returned result in order to store it during a subsequent saveSettingsBranchSpecs() call.- Parameters:
root
- VCS root of interest- Returns:
- see above
-
saveSettingsBranchSpecs
boolean saveSettingsBranchSpecs(@NotNull LVcsRootInstance root)
Saves branch specs of the specified VCS root previously returned by the getCurrentSettingsBranchSpecs() method, so that the subsequent call to getPrevSettingsBranchSpecs() returns them. Returns true if settings VCS root or its branch specification were changed comparing to their previous values in at least one project.- Parameters:
root
- settings root of interest- Returns:
- see above
-
hasCustomSettings
boolean hasCustomSettings(@NotNull LVcsRootInstanceHolder buildType, @NotNull LVcsRootInstance root, @NotNull CheckoutRules rules)
Returns true if the specified root or checkout rules are different from the one attached to the given buildType- Parameters:
buildType
- buildType of interestroot
- VCS root instance to checkrules
- checkout rules to check- Returns:
- see above
-
shouldWaitForChangesCollectionFinishing
boolean shouldWaitForChangesCollectionFinishing(@NotNull LVcsRootInstance inst)
-
isRecoverableError
default boolean isRecoverableError(@NotNull VcsException e)
-
getReportedProblems
@NotNull List<VcsRootVcsException> getReportedProblems()
- Returns:
- the list of VCS errors reported via the
VcsChangesLoaderCallback.reportCollectChangesProblem(VcsRootVcsException)
-
getOperationRejectedReason
@Nullable default ChangesLoaderContext.OperationRejectedReason getOperationRejectedReason()
Returns a reason of a rejected checking for changes operation in one of the VCS roots. If operation is rejected then it should be repeated later.- Returns:
- reason if operation was rejected or null
- Since:
- 2021.1.2
-
shouldCollectChangesForVcsRoot
default boolean shouldCollectChangesForVcsRoot(@NotNull LVcsRootInstance root, @NotNull RepositoryState currentState)
-
getVcsChangesLoaderMetrics
@NotNull VcsChangesLoaderMetrics getVcsChangesLoaderMetrics()
-
-