Package jetbrains.buildServer.serverSide
Class LimitingVcsModificationProcessor
- java.lang.Object
-
- jetbrains.buildServer.serverSide.VcsModificationProcessor
-
- jetbrains.buildServer.serverSide.LimitingVcsModificationProcessor
-
public class LimitingVcsModificationProcessor extends VcsModificationProcessor
VCS modification processor limiting number of modifications per VCS root.
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.serverSide.VcsModificationProcessor
ACCEPT_ALL
-
-
Constructor Summary
Constructors Constructor Description LimitingVcsModificationProcessor(int perRootLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
Should return a unique id of the processor.Integer
getLimit()
boolean
isSuitableFor(VcsModificationProcessor anotherProcessor)
Returns true if changes calculated with this processor are suitable for the provided processor too.boolean
isUnlimited()
boolean
processAttachedModification(SVcsModification item)
Processes a single SVcsModification.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.-
Methods inherited from class jetbrains.buildServer.serverSide.VcsModificationProcessor
changesCanBeCached, filterOrderedModifications, processModification
-
-
-
-
Method Detail
-
getId
@NotNull public String getId()
Description copied from class:VcsModificationProcessor
Should return a unique id of the processor. It is used as a key for caching calculated modifications.- Specified by:
getId
in classVcsModificationProcessor
- Returns:
- see above
-
processAttachedModification
public boolean processAttachedModification(@NotNull SVcsModification item)
Description copied from class:VcsModificationProcessor
Processes a single SVcsModification. This method is called only for changes attached to a build configuration where the changes calculation is performed.- Specified by:
processAttachedModification
in classVcsModificationProcessor
- Parameters:
item
- VCS modification to process.- Returns:
- false if no further processing needed.
-
processUnloadedModification
public boolean processUnloadedModification(long modId, long vcsRootId)
Description copied from class:VcsModificationProcessor
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.- Overrides:
processUnloadedModification
in classVcsModificationProcessor
- Parameters:
modId
- id of the unloaded modificationvcsRootId
- id of the VCS root instance- Returns:
- true if processing should be continued and false otherwise
-
isSuitableFor
public boolean isSuitableFor(@NotNull VcsModificationProcessor anotherProcessor)
Description copied from class:VcsModificationProcessor
Returns true if changes calculated with this processor are suitable for the provided processor too.- Overrides:
isSuitableFor
in classVcsModificationProcessor
- Returns:
-
getLimit
@NotNull public Integer getLimit()
- Specified by:
getLimit
in classVcsModificationProcessor
- 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).
-
isUnlimited
public boolean isUnlimited()
-
-