Uses of Class
org.jenkins.plugins.lockableresources.LockableResource
Package
Description
-
Uses of LockableResource in org.jenkins.plugins.lockableresources
Modifier and TypeMethodDescriptionReturns resource matched by name.LockableResourcesManager.getFirst()
For testing purpose.Modifier and TypeMethodDescriptionLockableResourcesManager.getAvailableResources
(List<LockableResourcesStruct> requiredResourcesList) 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.LockableResourcesManager.getAvailableResources
(QueuedContextStruct entry) LockableResourcesManager.getDeclaredResources()
Get declared resources, means only defined in config file (xml or JCaC yaml).LockableResourcesManager.getReadOnlyResources()
Get all resources - read only The same as getResources() but unmodifiable list.LockableResources.getResources()
LockableResourcesManager.getResources()
Get all resources Includes declared, ephemeral and node resourcesLockableResourcesManager.getResourcesFromProject
(String fullName) Get all resources used by project.LockableResourcesManager.getResourcesMatchingScript
(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript script, Map<String, Object> params) Returns a list of resources matching by given *script*.LockableResourcesManager.getResourcesWithLabel
(String label) Returns resources matching by given *label*.LockableResourcesManager.getResourcesWithLabel
(String label, Map<String, Object> params) Deprecated.Use getResourcesWithLabel(String label) Note: The param *params* is not used (has no effect)LockableResourcesManager.queue
(LockableResourcesStruct requiredResources, long queueItemId, String queueItemProject, int number, Map<String, Object> params, Logger log) 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.Modifier and TypeMethodDescriptionboolean
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.Modifier and TypeMethodDescriptionLockableResourcesManager.getResourcesNames
(List<LockableResource> resources) Returns names (IDs) of given *resources*.boolean
LockableResourcesManager.lock
(List<LockableResource> resourcesToLock, 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 reusable 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.unlockResources
(List<LockableResource> resourcesToUnLock) void
LockableResourcesManager.unlockResources
(List<LockableResource> resourcesToUnLock, Run<?, ?> build) void
LockableResourcesManager.unreserve
(List<LockableResource> resources) -
Uses of LockableResource in org.jenkins.plugins.lockableresources.actions
Modifier and TypeMethodDescriptionLockableResourcesRootAction.Queue.QueueStruct.getRequiredResources()
LockableResourcesRootAction.getResources()
Get a list of resourcesModifier and TypeMethodDescriptionvoid
LockableResourcesRootAction.LockableResourcesLabel.update
(LockableResource resource) -
Uses of LockableResource in org.jenkins.plugins.lockableresources.queue
Modifier and TypeMethodDescriptionboolean
LockableResourcesStruct.isResourceRequired
(LockableResource resource) Check if the *resource* is required by this struct / queue