Package jetbrains.buildServer.serverSide
Class VcsModificationProcessor
- java.lang.Object
-
- jetbrains.buildServer.serverSide.VcsModificationProcessor
-
- Direct Known Subclasses:
LimitingVcsModificationProcessor,LowerBoundModificationProcessor
public abstract class VcsModificationProcessor extends Object
VCS modification processor for use during changes calculation
-
-
Field Summary
Fields Modifier and Type Field Description static VcsModificationProcessorACCEPT_ALL
-
Constructor Summary
Constructors Constructor Description VcsModificationProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanchangesCanBeCached()static List<SVcsModification>filterOrderedModifications(List<SVcsModification> orderedChanges, VcsModificationProcessor processor)Traverse ordered changes and collect them while they confirm the given processor; on the first non-conforming item stop and return collected items.abstract StringgetId()Should return a unique id of the processor.abstract IntegergetLimit()booleanisSuitableFor(VcsModificationProcessor anotherProcessor)Returns true if changes calculated with this processor are suitable for the provided processor too.abstract booleanprocessAttachedModification(SVcsModification vcsModification)Processes a single SVcsModification.booleanprocessModification(SVcsModification vcsModification)This method is called for every SVcsModification visited during the changes collection process.booleanprocessUnloadedModification(long modId, long vcsRootId)This method is called when we've reached a VCS modification which is not loaded into the in-memory cache.
-
-
-
Field Detail
-
ACCEPT_ALL
public static final VcsModificationProcessor ACCEPT_ALL
-
-
Method Detail
-
getId
@NotNull public abstract String getId()
Should return a unique id of the processor. It is used as a key for caching calculated modifications.- Returns:
- see above
-
getLimit
@Nullable public abstract Integer getLimit()
- Returns:
- the limit for changes this processor uses or null if processor doesn't limit changes or doesn't limit them by the amount (e.g. limit by date).
-
changesCanBeCached
public boolean changesCanBeCached()
- Returns:
- true if changes calculated with help of this processor can be cached and false otherwise Note: if false is returned by this method then existing cached changes won't be used when changes are computed with help of this processor
-
isSuitableFor
public boolean isSuitableFor(@NotNull VcsModificationProcessor anotherProcessor)Returns true if changes calculated with this processor are suitable for the provided processor too.- Parameters:
anotherProcessor-- Returns:
-
processAttachedModification
public abstract boolean processAttachedModification(@NotNull SVcsModification vcsModification)Processes a single SVcsModification. This method is called only for changes attached to a build configuration where the changes calculation is performed.- Parameters:
vcsModification- VCS modification to process.- Returns:
- false if no further processing needed.
- Since:
- 2019.2.3
-
processModification
public boolean processModification(@NotNull SVcsModification vcsModification)This method is called for every SVcsModification visited during the changes collection process.- Parameters:
vcsModification- visited VCS modification- Returns:
- false if no further processing needed.
- Since:
- 2019.2.3
-
processUnloadedModification
public boolean processUnloadedModification(long modId, long vcsRootId)This method is called when we've reached a VCS modification which is not loaded into the in-memory cache. For instance, this can happen if the VCS modification is too old and was already unloaded from memory.- Parameters:
modId- id of the unloaded modificationvcsRootId- id of the VCS root instance- Returns:
- true if processing should be continued and false otherwise
-
filterOrderedModifications
@NotNull public static List<SVcsModification> filterOrderedModifications(@NotNull List<SVcsModification> orderedChanges, @NotNull VcsModificationProcessor processor)
Traverse ordered changes and collect them while they confirm the given processor; on the first non-conforming item stop and return collected items.- Parameters:
orderedChanges- changesprocessor- processor- Returns:
- filtered collection, see above
-
-