Package jenkins.branch
Class RateLimitBranchProperty
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<BranchProperty>
-
- jenkins.branch.BranchProperty
-
- jenkins.branch.RateLimitBranchProperty
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<BranchProperty>
public class RateLimitBranchProperty extends BranchProperty
A branch property that limits how often a specific branch can be built.- Author:
- Stephen Connolly
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RateLimitBranchProperty.DescriptorImpl
Our descriptorstatic class
RateLimitBranchProperty.JobPropertyImpl
static class
RateLimitBranchProperty.QueueTaskDispatcherImpl
This does the work of blocking builds while the throttle is enforced.static class
RateLimitBranchProperty.Throttle
This class is to work around some annoying "features" of f:optionalBlock-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description RateLimitBranchProperty(int count, String durationName)
Deprecated.RateLimitBranchProperty(int count, String durationName, boolean userBoost)
Constructor for stapler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCount()
Gets the maximum builds within the duration.String
getDurationName()
Gets the duration.boolean
isUserBoost()
Gets the user boost setting.<P extends Job<P,B>,B extends Run<P,B>>
JobDecorator<P,B>jobDecorator(Class<P> jobType)
Returns aJobDecorator
for the specific job type.-
Methods inherited from class jenkins.branch.BranchProperty
asArrayList, decorator, decorator, getDescriptor
-
-
-
-
Constructor Detail
-
RateLimitBranchProperty
@Deprecated public RateLimitBranchProperty(int count, String durationName)
Deprecated.Constructor for stapler.- Parameters:
count
- the maximum builds within the duration.durationName
- the name of the duration.
-
RateLimitBranchProperty
@DataBoundConstructor public RateLimitBranchProperty(int count, String durationName, boolean userBoost)
Constructor for stapler.- Parameters:
count
- the maximum builds within the duration.durationName
- the name of the duration.userBoost
-true
to allow user submitted jobs to ignore the rate limits.
-
-
Method Detail
-
getCount
public int getCount()
Gets the maximum builds within the duration.- Returns:
- the maximum builds within the duration.
-
getDurationName
public String getDurationName()
Gets the duration.- Returns:
- the duration.
-
isUserBoost
public boolean isUserBoost()
Gets the user boost setting.- Returns:
- the user boost setting.
-
jobDecorator
public <P extends Job<P,B>,B extends Run<P,B>> JobDecorator<P,B> jobDecorator(Class<P> jobType)
Returns aJobDecorator
for the specific job type.- Overrides:
jobDecorator
in classBranchProperty
- Type Parameters:
P
- the type of job.B
- the type of run of the job.- Parameters:
jobType
- the job class.- Returns:
- a
JobDecorator
ornull
if none appropriate to this type of job.
-
-