Class LockStepResource
java.lang.Object
hudson.model.AbstractDescribableImpl<LockStepResource>
org.jenkins.plugins.lockableresources.LockStepResource
- All Implemented Interfaces:
Describable<LockStepResource>,Serializable
public class LockStepResource
extends AbstractDescribableImpl<LockStepResource>
implements Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidsetQuantity(int quantity) voidtoString()static Stringstatic Stringvoidvalidate(boolean allowEmptyOrNullValues) Label and resource are mutual exclusive.static voidvalidate(String resource, String label, int quantity, String resourceSelectStrategy, List<LockStepResource> extra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues) Validate input parameters.static voidvalidate(String resource, String label, String resourceSelectStrategy, boolean hasExtra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues) Label and resource are mutual exclusive.static voidvalidate(String resource, String label, String resourceSelectStrategy, List<LockStepResource> extra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues) Validate input parametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Field Details
-
resource
-
label
-
quantity
public int quantity -
reason
The reason why this resource is being locked, displayed in the UI while locked.
-
-
Constructor Details
-
LockStepResource
-
-
Method Details
-
setLabel
-
setQuantity
@DataBoundSetter public void setQuantity(int quantity) -
setReason
-
toString
-
toString
-
toString
-
validate
public void validate(boolean allowEmptyOrNullValues) Label and resource are mutual exclusive. -
validate
public static void validate(String resource, String label, String resourceSelectStrategy, List<LockStepResource> extra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues) Validate input parameters -
validate
public static void validate(String resource, String label, int quantity, String resourceSelectStrategy, List<LockStepResource> extra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues) Validate input parameters. IfLockableResourcesManager.isFailFastOnInsufficientResources()is enabled, also check that no label request (main or extra) asks for more resources than exist with that label. Otherwise such a request waits until enough resources exist. -
validate
public static void validate(String resource, String label, String resourceSelectStrategy, boolean hasExtra, int priority, boolean inversePrecedence, boolean allowEmptyOrNullValues) Label and resource are mutual exclusive. The label, if provided, must be configured (at least one resource must have this label).
-