Class LockableResourcesStruct
java.lang.Object
org.jenkins.plugins.lockableresources.queue.LockableResourcesStruct
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionlong -
Constructor Summary
ConstructorsConstructorDescriptionLockableResourcesStruct(List<String> resources) Light-weight constructor for declaring a resource only.LockableResourcesStruct(List<String> resources, String label, int quantity) LockableResourcesStruct(List<String> resources, String label, int quantity, String variable) LockableResourcesStruct(RequiredResourcesProperty property, EnvVars env) -
Method Summary
Modifier and TypeMethodDescriptionorg.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScriptGets a system Groovy script to be executed in order to determine if theLockableResourcematches the condition.booleanisResourceRequired(LockableResource resource) Check if the *resource* is required by this struct / queuetoString()
-
Field Details
-
required
-
label
-
requiredVar
-
requiredNumber
-
queuedAt
public long queuedAt
-
-
Constructor Details
-
LockableResourcesStruct
-
LockableResourcesStruct
Light-weight constructor for declaring a resource only.- Parameters:
resources- Resources to be required
-
LockableResourcesStruct
-
LockableResourcesStruct
-
-
Method Details
-
getResourceMatchScript
@CheckForNull public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getResourceMatchScript() throws Descriptor.FormExceptionGets a system Groovy script to be executed in order to determine if theLockableResourcematches the condition.- Returns:
- System Groovy Script if defined
- Throws:
Descriptor.FormException- Since:
- 2.1
- See Also:
-
getResourceMatchScriptText
-
toString
-
isResourceRequired
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isResourceRequired(LockableResource resource) Check if the *resource* is required by this struct / queue
-