Class LockableResourcesStruct
- java.lang.Object
-
- org.jenkins.plugins.lockableresources.queue.LockableResourcesStruct
-
- All Implemented Interfaces:
Serializable
public class LockableResourcesStruct extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description String
label
long
queuedAt
List<LockableResource>
required
String
requiredNumber
String
requiredVar
-
Constructor Summary
Constructors Constructor Description LockableResourcesStruct(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript
getResourceMatchScript()
Gets a system Groovy script to be executed in order to determine if theLockableResource
matches the condition.boolean
isResourceRequired(LockableResource resource)
Check if the *resource* is required by this struct / queueString
toString()
-
-
-
Field Detail
-
required
public List<LockableResource> required
-
label
public String label
-
requiredVar
public String requiredVar
-
requiredNumber
public String requiredNumber
-
queuedAt
public long queuedAt
-
-
Constructor Detail
-
LockableResourcesStruct
public LockableResourcesStruct(RequiredResourcesProperty property, EnvVars env)
-
LockableResourcesStruct
public LockableResourcesStruct(@Nullable List<String> resources)
Light-weight constructor for declaring a resource only.- Parameters:
resources
- Resources to be required
-
LockableResourcesStruct
public LockableResourcesStruct(@Nullable List<String> resources, @Nullable String label, int quantity, String variable)
-
-
Method Detail
-
getResourceMatchScript
@CheckForNull public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getResourceMatchScript()
Gets a system Groovy script to be executed in order to determine if theLockableResource
matches the condition.- Returns:
- System Groovy Script if defined
- Since:
- 2.1
- See Also:
LockableResource.scriptMatches(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript, java.util.Map)
-
isResourceRequired
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isResourceRequired(LockableResource resource)
Check if the *resource* is required by this struct / queue
-
-