Class KeepNDaysSinceLastSuccessfulBuildLimit
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.cleanup.v2019.limits.KeepNDaysSinceLastSuccessfulBuildLimit
-
- All Implemented Interfaces:
DbFieldsProvider,KeepLimit,KeepFeatureParamsProvider
public class KeepNDaysSinceLastSuccessfulBuildLimit extends Object implements KeepLimit
Keep builds within fixed days count before first successful build (excluding its day) and all not successful builds after it.- Since:
- 2019.1
-
-
Field Summary
Fields Modifier and Type Field Description static StringDAYS_COUNT_PARAMstatic StringTYPE-
Fields inherited from interface jetbrains.buildServer.serverSide.impl.cleanup.v2019.settings.KeepFeatureParamsProvider
TYPE_PARAM
-
-
Constructor Summary
Constructors Constructor Description KeepNDaysSinceLastSuccessfulBuildLimit(int daysCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static KeepNDaysSinceLastSuccessfulBuildLimitfromFeatureParams(Map<String,String> params)Map<String,String>getOwnParams()Provides own entity parameters to store.Collection<DbField<?>>getRequiredDbFields()Returns all the database fields that are needed for an inheritor.StringgetType()Unique entity type identifier that allows to distinct it from another.inthashCode()gnu.trove.TLongCollectionlimit(DbBuildsData builds)Limitsbuildsthat should be kept according to the limit.
It is expected that allbuildsbelong to the same build configuration.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.impl.cleanup.v2019.settings.KeepFeatureParamsProvider
getParamsWithType
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
DAYS_COUNT_PARAM
public static final String DAYS_COUNT_PARAM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KeepNDaysSinceLastSuccessfulBuildLimit
public KeepNDaysSinceLastSuccessfulBuildLimit(int daysCount) throws IllegalRuleParamsException- Throws:
IllegalRuleParamsException
-
-
Method Detail
-
fromFeatureParams
@NotNull public static KeepNDaysSinceLastSuccessfulBuildLimit fromFeatureParams(@NotNull Map<String,String> params) throws IllegalRuleParamsException
- Throws:
IllegalRuleParamsException
-
getRequiredDbFields
@NotNull public Collection<DbField<?>> getRequiredDbFields()
Description copied from interface:DbFieldsProviderReturns all the database fields that are needed for an inheritor.- Specified by:
getRequiredDbFieldsin interfaceDbFieldsProvider
-
limit
@NotNull public gnu.trove.TLongCollection limit(@NotNull DbBuildsData builds)Description copied from interface:KeepLimitLimitsbuildsthat should be kept according to the limit.
It is expected that allbuildsbelong to the same build configuration. Build ids ofbuildsare sorted in descending order.
-
getType
@NotNull public String getType()
Description copied from interface:KeepFeatureParamsProviderUnique entity type identifier that allows to distinct it from another.- Specified by:
getTypein interfaceKeepFeatureParamsProvider
-
getOwnParams
@NotNull public Map<String,String> getOwnParams()
Description copied from interface:KeepFeatureParamsProviderProvides own entity parameters to store.- Specified by:
getOwnParamsin interfaceKeepFeatureParamsProvider
-
-