Uses of Class
org.jenkins.plugins.lockableresources.LockableResource
-
Packages that use LockableResource Package Description org.jenkins.plugins.lockableresources org.jenkins.plugins.lockableresources.actions org.jenkins.plugins.lockableresources.queue -
-
Uses of LockableResource in org.jenkins.plugins.lockableresources
Methods in org.jenkins.plugins.lockableresources that return LockableResource Modifier and Type Method Description LockableResource
LockableResourcesManager. fromName(String resourceName)
Returns resource matched by name.LockableResource
LockableResourcesManager. getFirst()
For testing purpose.Methods in org.jenkins.plugins.lockableresources that return types with arguments of type LockableResource Modifier and Type Method Description List<LockableResource>
LockableResourcesManager. fromNames(List<String> names)
List<LockableResource>
LockableResourcesManager. fromNames(List<String> names, boolean createResource)
List<LockableResource>
LockableResourcesManager. getAvailableResources(List<LockableResourcesStruct> requiredResourcesList)
List<LockableResource>
LockableResourcesManager. getAvailableResources(List<LockableResourcesStruct> requiredResourcesList, PrintStream logger, ResourceSelectStrategy selectStrategy)
Checks if there are enough resources available to satisfy the requirements specified within requiredResources and returns the necessary available resources.List<LockableResource>
LockableResourcesManager. getAvailableResources(QueuedContextStruct entry)
List<LockableResource>
LockableResourcesManager. getDeclaredResources()
Get declared resources, means only defined in config file (xml or JCaC yaml).List<LockableResource>
LockableResourcesManager. getReadOnlyResources()
Get all resources - read only The same as getResources() but unmodifiable list.List<LockableResource>
LockableResources. getResources()
List<LockableResource>
LockableResourcesManager. getResources()
Get all resources Includes declared, ephemeral and node resourcesList<LockableResource>
LockableResourcesManager. getResourcesFromBuild(Run<?,?> build)
Get all resources used by build.List<LockableResource>
LockableResourcesManager. getResourcesFromProject(String fullName)
Get all resources used by project.List<LockableResource>
LockableResourcesManager. getResourcesMatchingScript(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript script, Map<String,Object> params)
Returns a list of resources matching by given *script*.List<LockableResource>
LockableResourcesManager. getResourcesWithLabel(String label)
Returns resources matching by given *label*.List<LockableResource>
LockableResourcesManager. getResourcesWithLabel(String label, Map<String,Object> params)
Deprecated.Use getResourcesWithLabel(String label) Note: The param *params* is not used (has no effect)List<LockableResource>
LockableResourcesManager. queue(LockableResourcesStruct requiredResources, long queueItemId, String queueItemProject, int number, Map<String,Object> params, Logger log)
List<LockableResource>
LockableResourcesManager. tryQueue(LockableResourcesStruct requiredResources, long queueItemId, String queueItemProject, int number, Map<String,Object> params, Logger log)
Try to acquire the resources required by the task.Methods in org.jenkins.plugins.lockableresources with parameters of type LockableResource Modifier and Type Method Description boolean
LockableResourcesManager. addResource(LockableResource resource)
boolean
LockableResourcesManager. addResource(LockableResource resource, boolean doSave)
void
LockableResource. copyUnconfigurableProperties(LockableResource sourceResource)
Copy unconfigurable properties from another instance.boolean
LockableResourcesManager. uncacheIfFreeing(LockableResource candidate, boolean unlocking, boolean unreserving)
If the lockable resource availability was evaluated before and cached to avoid frequent re-evaluations under queued pressure when there are no resources to give, we should state that a resource is again instantly available for re-evaluation when we know it was busy and right now is being freed.Method parameters in org.jenkins.plugins.lockableresources with type arguments of type LockableResource Modifier and Type Method Description static List<String>
LockableResourcesManager. getResourcesNames(List<LockableResource> resources)
Returns names (IDs) of given *resources*.boolean
LockableResourcesManager. lock(List<LockableResource> resources, Run<?,?> build)
Try to lock the resource and return true if locked.boolean
LockableResourcesManager. lock(List<LockableResource> resources, Run<?,?> build, org.jenkinsci.plugins.workflow.steps.StepContext context)
Deprecated.boolean
LockableResourcesManager. lock(List<LockableResource> resources, Run<?,?> build, org.jenkinsci.plugins.workflow.steps.StepContext context, String logmessage, String variable, boolean inversePrecedence)
Deprecated.boolean
LockableResourcesManager. queue(List<LockableResource> resources, long queueItemId, String queueProjectName)
void
LockableResourcesManager. reassign(List<LockableResource> resources, String userName)
Reserves a resource that may be or not be reserved by some person already, giving it away to the userName indefinitely (until that person, or some explicit scripted action, decides to release the resource).void
LockableResourcesManager. recycle(List<LockableResource> resources)
Make the lockable resource re-usable and notify the queue(s), if any WARNING: Do not use this from inside the lock step closure which originally locked this resource, to avoid nasty surprises! Namely, this *might* let a second consumer use the resource quickly, but when the original closure ends and unlocks again that resource, a third consumer might then effectively hijack it from the second one.void
LockableResourcesManager. removeResources(List<LockableResource> toBeRemoved)
Function removes all given resourcesboolean
LockableResourcesManager. reserve(List<LockableResource> resources, String userName)
Reserves an available resource for the userName indefinitely (until that person, or some explicit scripted action, decides to release the resource).void
LockableResourcesManager. reset(List<LockableResource> resources)
void
LockableResourcesManager. setDeclaredResources(List<LockableResource> declaredResources)
Set all declared resources (do not includes ephemeral and node resources).boolean
LockableResourcesManager. steal(List<LockableResource> resources, String userName)
Reserves a resource that may be or not be locked by some job (or reserved by some user) already, giving it away to the userName indefinitely (until that person, or some explicit scripted action, later decides to release the resource).void
LockableResourcesManager. unlock(List<LockableResource> resourcesToUnLock, Run<?,?> build)
Deprecated.void
LockableResourcesManager. unlock(List<LockableResource> resourcesToUnLock, Run<?,?> build, boolean inversePrecedence)
Deprecated.void
LockableResourcesManager. unreserve(List<LockableResource> resources)
-
Uses of LockableResource in org.jenkins.plugins.lockableresources.actions
Methods in org.jenkins.plugins.lockableresources.actions that return LockableResource Modifier and Type Method Description LockableResource
LockableResourcesRootAction. getResource(String resourceName)
Methods in org.jenkins.plugins.lockableresources.actions that return types with arguments of type LockableResource Modifier and Type Method Description List<LockableResource>
LockableResourcesRootAction.Queue.QueueStruct. getRequiredResources()
List<LockableResource>
LockableResourcesRootAction. getResources()
Get a list of resourcesMethods in org.jenkins.plugins.lockableresources.actions with parameters of type LockableResource Modifier and Type Method Description void
LockableResourcesRootAction.LockableResourcesLabel. update(LockableResource resource)
Method parameters in org.jenkins.plugins.lockableresources.actions with type arguments of type LockableResource Modifier and Type Method Description static LockedResourcesBuildAction
LockedResourcesBuildAction. fromResources(Collection<LockableResource> resources)
Create action from resources.Constructors in org.jenkins.plugins.lockableresources.actions with parameters of type LockableResource Constructor Description ResourcePOJO(LockableResource r)
-
Uses of LockableResource in org.jenkins.plugins.lockableresources.queue
Fields in org.jenkins.plugins.lockableresources.queue with type parameters of type LockableResource Modifier and Type Field Description List<LockableResource>
LockableResourcesStruct. required
Methods in org.jenkins.plugins.lockableresources.queue with parameters of type LockableResource Modifier and Type Method Description boolean
LockableResourcesStruct. isResourceRequired(LockableResource resource)
Check if the *resource* is required by this struct / queue
-