Class BuildExpiryBatchProcessor
java.lang.Object
com.atlassian.bamboo.build.expiry.BuildExpiryBatchProcessor
Processor of build result batches, applying a supplied logic to expire them.
It supports strategies to optimize resources via
BuildExpiryBatchProcessor.BatchProcessingPolicy
.- Since:
- 9.5
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
-
Constructor Summary
ConstructorDescriptionBuildExpiryBatchProcessor
(@NotNull ImmutablePlan plan, @NotNull BuildExpiryConfig config, @NotNull MutableExpiryCriteria expiryCriteria, @NotNull TransactionAndHibernateTemplate template, @NotNull ResultsSummaryManager resultsSummaryManager) -
Method Summary
Modifier and TypeMethodDescriptionlong
expire
(@NotNull BiFunction<ResultsSummary, BuildExpiryConfig, Boolean> resultSummaryExpiry) Runs the expiry process and apply the given resultSummaryExpiry on each results summary found.long
-
Field Details
-
DEFAULT_MINIMUM_SUCCESSFUL_EXPIRY_PERCENTAGE_TO_KEEP_PROCESSING
public static final double DEFAULT_MINIMUM_SUCCESSFUL_EXPIRY_PERCENTAGE_TO_KEEP_PROCESSING- See Also:
-
-
Constructor Details
-
BuildExpiryBatchProcessor
public BuildExpiryBatchProcessor(@NotNull @NotNull ImmutablePlan plan, @NotNull @NotNull BuildExpiryConfig config, @NotNull @NotNull MutableExpiryCriteria expiryCriteria, @NotNull @NotNull TransactionAndHibernateTemplate template, @NotNull @NotNull ResultsSummaryManager resultsSummaryManager)
-
-
Method Details
-
expire
public long expire(@NotNull @NotNull BiFunction<ResultsSummary, BuildExpiryConfig, Boolean> resultSummaryExpiry) Runs the expiry process and apply the given resultSummaryExpiry on each results summary found.- Parameters:
resultSummaryExpiry
- the function that expires a results summary- Returns:
- the number of results summaries successfully expired
-
getTotalSuccessfullyExpiredBuilds
public long getTotalSuccessfullyExpiredBuilds()- Returns:
- the total number of successfully expired builds
-