Class LegacyKeepNBuildsLimit
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.cleanup.v2019.limits.LegacyKeepNBuildsLimit
-
- All Implemented Interfaces:
DbFieldsProvider
,KeepLimit
,KeepFeatureParamsProvider
public class LegacyKeepNBuildsLimit extends Object implements KeepLimit
Keep the fixed number of the last successful builds ordered by build id. All not successful builds lying between the successful ones are not included in the count and are also preserved. If there are lesser successful builds than specified number, all not successful builds before the oldest successful will not be kept. Analogue for old cleanup policyKeepNBuildsPolicy
. Should be used with two partitions: by branches and by personality.- Since:
- 2019.1
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE
-
Fields inherited from interface jetbrains.buildServer.serverSide.impl.cleanup.v2019.settings.KeepFeatureParamsProvider
TYPE_PARAM
-
-
Constructor Summary
Constructors Constructor Description LegacyKeepNBuildsLimit(int buildsCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static LegacyKeepNBuildsLimit
fromFeatureParams(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.String
getType()
Unique entity type identifier that allows to distinct it from another.int
hashCode()
gnu.trove.TLongCollection
limit(DbBuildsData builds)
Limitsbuilds
that should be kept according to the limit.
It is expected that allbuilds
belong to the same build configuration.String
toString()
-
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
-
-
Constructor Detail
-
LegacyKeepNBuildsLimit
public LegacyKeepNBuildsLimit(int buildsCount) throws IllegalRuleParamsException
- Throws:
IllegalRuleParamsException
-
-
Method Detail
-
fromFeatureParams
@NotNull public static LegacyKeepNBuildsLimit fromFeatureParams(@NotNull Map<String,String> params) throws IllegalRuleParamsException
- Throws:
IllegalRuleParamsException
-
getRequiredDbFields
@NotNull public Collection<DbField<?>> getRequiredDbFields()
Description copied from interface:DbFieldsProvider
Returns all the database fields that are needed for an inheritor.- Specified by:
getRequiredDbFields
in interfaceDbFieldsProvider
-
limit
@NotNull public gnu.trove.TLongCollection limit(@NotNull DbBuildsData builds)
Description copied from interface:KeepLimit
Limitsbuilds
that should be kept according to the limit.
It is expected that allbuilds
belong to the same build configuration. Build ids ofbuilds
are sorted in descending order.
-
getType
@NotNull public String getType()
Description copied from interface:KeepFeatureParamsProvider
Unique entity type identifier that allows to distinct it from another.- Specified by:
getType
in interfaceKeepFeatureParamsProvider
-
getOwnParams
@NotNull public Map<String,String> getOwnParams()
Description copied from interface:KeepFeatureParamsProvider
Provides own entity parameters to store.- Specified by:
getOwnParams
in interfaceKeepFeatureParamsProvider
-
-