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:
  • Field Details

    • resource

      @CheckForNull public String resource
    • label

      @CheckForNull public String label
    • quantity

      public int quantity
    • reason

      @CheckForNull public String reason
      The reason why this resource is being locked, displayed in the UI while locked.
  • Constructor Details

    • LockStepResource

      @DataBoundConstructor public LockStepResource(@Nullable String resource)
  • Method Details

    • getGroup

      @CheckForNull public String getGroup()
      Null inherits the main lock step's group.
      Since:
      TODO
    • setGroup

      @DataBoundSetter public void setGroup(@Nullable String group)
      Since:
      TODO
    • setLabel

      @DataBoundSetter public void setLabel(String label)
    • setQuantity

      @DataBoundSetter public void setQuantity(int quantity)
    • setReason

      @DataBoundSetter public void setReason(String reason)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public static String toString(String resource, String label, int quantity)
    • toString

      public static String toString(String resource, String label, int quantity, String reason)
    • 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. If LockableResourcesManager.isFailFastOnInsufficientResources() is enabled, also check that no label request (main or extra) asks for more resources than exist with that label in the selected group. The main selector defaults to common. 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).