3131public class ThrottleJobProperty extends JobProperty <AbstractProject <?,?>> {
3232 // Moving category to categories, to support, well, multiple categories per job.
3333 @ Deprecated transient String category ;
34-
34+
3535 private Integer maxConcurrentPerNode ;
3636 private Integer maxConcurrentTotal ;
3737 private List <String > categories ;
@@ -47,7 +47,7 @@ public class ThrottleJobProperty extends JobProperty<AbstractProject<?,?>> {
4747 * functionality upgrades.
4848 */
4949 private Long configVersion ;
50-
50+
5151 @ DataBoundConstructor
5252 public ThrottleJobProperty (Integer maxConcurrentPerNode ,
5353 Integer maxConcurrentTotal ,
@@ -96,7 +96,7 @@ public Object readResolve() {
9696 }
9797
9898 configVersion = 1L ;
99-
99+
100100 return this ;
101101 }
102102
@@ -121,33 +121,34 @@ public boolean getThrottleEnabled() {
121121 return throttleEnabled ;
122122 }
123123
124- public boolean getlimitOneJobWithMatchingParams () {
124+ public boolean isLimitOneJobWithMatchingParams () {
125125 return limitOneJobWithMatchingParams ;
126126 }
127127
128+
128129 public String getLimitOneJobByParams () {
129130 return limitOneJobByParams ;
130131 }
131132
132133 public String getThrottleOption () {
133134 return throttleOption ;
134135 }
135-
136+
136137 public List <String > getCategories () {
137138 return categories ;
138139 }
139-
140+
140141 public Integer getMaxConcurrentPerNode () {
141142 if (maxConcurrentPerNode == null )
142143 maxConcurrentPerNode = 0 ;
143-
144+
144145 return maxConcurrentPerNode ;
145146 }
146147
147148 public Integer getMaxConcurrentTotal () {
148149 if (maxConcurrentTotal == null )
149150 maxConcurrentTotal = 0 ;
150-
151+
151152 return maxConcurrentTotal ;
152153 }
153154
@@ -179,24 +180,24 @@ private static Item getItem(ItemGroup group, String name) {
179180 return group .getItem (name );
180181 }
181182 }
182-
183+
183184 @ Extension
184185 public static final class DescriptorImpl extends JobPropertyDescriptor {
185186 private List <ThrottleCategory > categories ;
186-
187+
187188 /** Map from category names, to properties including that category. */
188189 private Map <String ,Map <ThrottleJobProperty ,Void >> propertiesByCategory = new HashMap <String ,Map <ThrottleJobProperty ,Void >>();
189-
190+
190191 public DescriptorImpl () {
191192 super (ThrottleJobProperty .class );
192193 load ();
193194 }
194-
195+
195196 @ Override
196197 public String getDisplayName () {
197198 return "Throttle Concurrent Builds" ;
198199 }
199-
200+
200201 @ Override
201202 @ SuppressWarnings ("rawtypes" )
202203 public boolean isApplicable (Class <? extends Job > jobType ) {
@@ -236,10 +237,10 @@ public FormValidation doCheckMaxConcurrentTotal(@QueryParameter String value) {
236237 return checkNullOrInt (value );
237238 }
238239
239-
240+
240241 public ThrottleCategory getCategoryByName (String categoryName ) {
241242 ThrottleCategory category = null ;
242-
243+
243244 for (ThrottleCategory tc : categories ) {
244245 if (tc .getCategoryName ().equals (categoryName )) {
245246 category = tc ;
@@ -252,7 +253,7 @@ public ThrottleCategory getCategoryByName(String categoryName) {
252253 public void setCategories (List <ThrottleCategory > categories ) {
253254 this .categories = categories ;
254255 }
255-
256+
256257 public List <ThrottleCategory > getCategories () {
257258 if (categories == null ) {
258259 categories = new ArrayList <ThrottleCategory >();
@@ -265,14 +266,14 @@ public ListBoxModel doFillCategoryItems() {
265266 ListBoxModel m = new ListBoxModel ();
266267
267268 m .add ("(none)" , "" );
268-
269+
269270 for (ThrottleCategory tc : getCategories ()) {
270271 m .add (tc .getCategoryName ());
271272 }
272273
273274 return m ;
274275 }
275-
276+
276277 }
277278
278279 public static final class ThrottleCategory extends AbstractDescribableImpl <ThrottleCategory > {
@@ -292,18 +293,18 @@ public ThrottleCategory(String categoryName,
292293 this .nodeLabeledPairs =
293294 nodeLabeledPairs == null ? new ArrayList <NodeLabeledPair >() : nodeLabeledPairs ;
294295 }
295-
296+
296297 public Integer getMaxConcurrentPerNode () {
297298 if (maxConcurrentPerNode == null )
298299 maxConcurrentPerNode = 0 ;
299-
300+
300301 return maxConcurrentPerNode ;
301302 }
302-
303+
303304 public Integer getMaxConcurrentTotal () {
304305 if (maxConcurrentTotal == null )
305306 maxConcurrentTotal = 0 ;
306-
307+
307308 return maxConcurrentTotal ;
308309 }
309310
0 commit comments