Serialized Form
-
Package org.jenkins.plugins.lockableresources
-
Class org.jenkins.plugins.lockableresources.FindLockableResourcesStep
class FindLockableResourcesStep extends org.jenkinsci.plugins.workflow.steps.Step implements Serializable- serialVersionUID:
- 1L
-
Class org.jenkins.plugins.lockableresources.LockableResource
- serialVersionUID:
- 1L
-
Serialization Methods
-
readResolve
-
-
Serialized Fields
-
buildExternalizableId
String buildExternalizableId
-
description
String description
-
disabledCause
String disabledCause
Why this resource is disabled, ornullwhen it is enabled. A disabled resource is not given to new lock requests (they wait as if it were busy), but a build that already holds it keeps it. Similar to the offline cause of a Jenkins node. -
ephemeral
boolean ephemeral
We can use arbitrary identifier in a temporary lock (e.g. a commit hash of built/tested sources), and not overwhelm Jenkins with lots of "garbage" locks. Such locks will be automatically removed when freed, if they were not explicitly declared in the Jenkins Configure System page. If an originally ephemeral lock is later defined in configuration, it becomes a usual persistent lock. If a "usual" lock definition is deleted while it is being held, it becomes ephemeral and will disappear when freed. -
group
String group
-
labelsAsList
List<String> labelsAsList
-
lockReason
String lockReason
The reason why this resource is currently locked. Set via the lock() step's reason parameter. Cleared when the resource is unlocked. -
name
String name
-
note
String note
-
properties
List<LockableResourceProperty> properties
-
queuedContexts
List<org.jenkinsci.plugins.workflow.steps.StepContext> queuedContexts
Deprecated.Replaced with LockableResourcesManager.queuedContexts (since 1.11)Was used within the initial implementation of Pipeline functionality usingLockStep, but became deprecated once several resources could be locked at once. See queuedContexts inLockableResourcesManager. -
queueItemId
long queueItemId
-
queueItemProject
String queueItemProject
-
queuingStarted
long queuingStarted
-
releaseAt
long releaseAt
Epoch millis when a delayed release (lock step onReleaseDelay / onCancelDelay) frees this resource, or 0 when no delayed release is pending. While set, the resource stays locked by the build that held it, even when that build has finished. Persisted, so the delay survives a restart. -
reservedBy
String reservedBy
-
reservedTimestamp
Date reservedTimestamp
-
shareHolders
LinkedHashSet<String> shareHolders
One entry per active lock block holding this resource, in acquisition order, formatted as<buildExternalizableId>@<blockStartNodeId>(seeLockableResource.shareHolderEntry(java.lang.String, java.lang.String)). A plainlock()block of a pipeline records its entry too (with noLockableResource.shareId), so that a nestedlock(shareId: ...)of the same build can join it and the resource is freed only when the last block ends. Empty when the resource is free or held without a lock block (freestyle builds, reservations, holds of older versions). The build of the first entry is the primary holder (LockableResource.buildExternalizableId). Not configurable.Guarded by
LockableResourcesManager.syncResources: mutators are called under it, and readers that iterate take it themselves. -
shareId
String shareId
Share id of the current local hold, ornullwhen the hold is not shared. Set by the first holder of alock(shareId: ...)block. Not configurable: no setter is exposed to the configuration form, JCasC or@DataBoundSetter. -
stolen
boolean stolen
Track that a currently reserved resource was originally reserved for someone else, or locked for some other job, and explicitly taken away - e.g. for SUT post-mortem while a test job runs. Currently this does not track "who" it was taken from nor intend to give it back - just for bookkeeping and UI button naming. Cleared when the resource is unReserve'd.
-
-
Class org.jenkins.plugins.lockableresources.LockableResourceProperty
class LockableResourceProperty extends AbstractDescribableImpl<LockableResourceProperty> implements Serializable- serialVersionUID:
- 1L
-
Class org.jenkins.plugins.lockableresources.LockStep
class LockStep extends org.jenkinsci.plugins.workflow.steps.Step implements Serializable- serialVersionUID:
- -953609907239674360L
-
Serialized Fields
-
candidates
List<String> candidates
Optional list of resource names to pick from, in list order. Without a quantity all listed resources are locked, like named resources; with a quantity the first free ones that exist are locked. Mutually exclusive withLockStep.resourceandLockStep.label. Not supported for remote locks. -
extra
List<LockStepResource> extra
-
group
String group
-
inversePrecedence
boolean inversePrecedence
-
label
String label
-
onCancelDelay
long onCancelDelay
Seconds the resources stay locked after the build is aborted inside the lock block. 0 (default) releases them immediately. -
onReleaseDelay
long onReleaseDelay
Seconds the resources stay locked after the lock block ends normally or fails, e.g. for a license cooldown. The pipeline continues right away. 0 (default) releases them immediately. -
priority
int priority
-
quantity
int quantity
-
reason
String reason
The reason why this resource is being locked, displayed in the UI while locked. -
resource
String resource
-
resourceSelectStrategy
String resourceSelectStrategy
-
serverId
String serverId
-
shareId
String shareId
Share id of this lock block. A block with a share id joins a hold of the same resources taken under the same share id by this build or one of its upstream builds, instead of waiting for it. Only named resources can be shared. -
skipIfLocked
boolean skipIfLocked
-
timeoutForAllocateResource
long timeoutForAllocateResource
Timeout in the specifiedLockStep.timeoutUnitfor waiting to acquire the resource. 0 means no timeout (wait indefinitely). When the timeout expires, the step fails with an exception instead of waiting forever. -
timeoutUnit
String timeoutUnit
Time unit forLockStep.timeoutForAllocateResource. Defaults to MINUTES. -
variable
String variable
name of environment variable to store locked resources in
-
-
Class org.jenkins.plugins.lockableresources.LockStepExecution
class LockStepExecution extends org.jenkinsci.plugins.workflow.steps.AbstractStepExecutionImpl implements Serializable- serialVersionUID:
- 1391734561272059623L
-
Serialized Fields
-
remoteSession
RemoteLockSession remoteSession
Non-null once a remotelock()flow has started; owns the acquire/poll/heartbeat/release machine. -
step
LockStep step
-
-
Class org.jenkins.plugins.lockableresources.LockStepResource
- serialVersionUID:
- 1L
-
Serialized Fields
-
candidates
List<String> candidates
Resource names to pick from, in list order. Mutually exclusive withLockStepResource.resourceandLockStepResource.label.- See Also:
-
group
String group
-
label
String label
-
quantity
int quantity
-
reason
String reason
The reason why this resource is being locked, displayed in the UI while locked. -
resource
String resource
-
-
Class org.jenkins.plugins.lockableresources.ResourceGroup
- serialVersionUID:
- 1L
-
Class org.jenkins.plugins.lockableresources.UpdateLockStep
class UpdateLockStep extends org.jenkinsci.plugins.workflow.steps.Step implements Serializable- serialVersionUID:
- -7955849755535282258L
-
Serialized Fields
-
addLabels
String addLabels
-
createResource
boolean createResource
-
deleteResource
boolean deleteResource
-
disabledCause
String disabledCause
-
disabledCauseSet
boolean disabledCauseSet
truewhen disabledCause was given, sodisabledCause: nullcan enable the resource. -
removeLabels
String removeLabels
-
resource
String resource
-
setLabels
String setLabels
-
setNote
String setNote
-
-
Class org.jenkins.plugins.lockableresources.UpdateLockStepExecution
class UpdateLockStepExecution extends org.jenkinsci.plugins.workflow.steps.AbstractStepExecutionImpl implements Serializable- serialVersionUID:
- 1583205294263267002L
-
Serialized Fields
-
step
UpdateLockStep step
-
-
-
Package org.jenkins.plugins.lockableresources.queue
-
Class org.jenkins.plugins.lockableresources.queue.LockableResourcesStruct
class LockableResourcesStruct extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
candidates
ArrayList<String> candidates
Resource names to pickLockableResourcesStruct.requiredNumberresources from, seeLockableResourcesStruct.getCandidates(). -
group
String group
-
groupOnly
boolean groupOnly
-
label
String label
-
queuedAt
long queuedAt
-
required
List<LockableResource> required
-
requiredNumber
String requiredNumber
-
requiredVar
String requiredVar
-
serializableResourceMatchScript
SerializableSecureGroovyScript serializableResourceMatchScript
-
-
Exception Class org.jenkins.plugins.lockableresources.queue.LockWaitTimeoutException
class LockWaitTimeoutException extends Exception implements Serializable- serialVersionUID:
- 1L
-
Class org.jenkins.plugins.lockableresources.queue.QueuedContextStruct
class QueuedContextStruct extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
context
org.jenkinsci.plugins.workflow.steps.StepContext context
-
id
String id
-
lockableResourcesStruct
List<LockableResourcesStruct> lockableResourcesStruct
-
onCancelDelay
long onCancelDelay
-
onReleaseDelay
long onReleaseDelay
-
priority
int priority
-
reason
String reason
-
resourceDescription
String resourceDescription
-
shareId
String shareId
-
timeoutDeadlineMillis
long timeoutDeadlineMillis
-
timeoutForAllocateResource
long timeoutForAllocateResource
-
timeoutUnit
String timeoutUnit
-
variableName
String variableName
-
-
-
Package org.jenkins.plugins.lockableresources.remote
-
Exception Class org.jenkins.plugins.lockableresources.remote.RemoteApiException
class RemoteApiException extends IOException implements Serializable -
Class org.jenkins.plugins.lockableresources.remote.RemoteLockSession
class RemoteLockSession extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
acquireDeadlineMillis
long acquireDeadlineMillis
Wall-clock deadline for the acquire retries, or 0 when the request waits forever. -
acquirePaused
boolean acquirePaused
Set while the remote answers 503 ACQUIRES_PAUSED and we are waiting for it to reopen. -
bodyStarted
boolean bodyStarted
-
completionSignaled
AtomicBoolean completionSignaled
-
consecutivePollFailures
int consecutivePollFailures
-
lastState
RemoteAcquireState lastState
-
lockId
String lockId
-
requestDescription
String requestDescription
What was asked for, kept so the page (and a resumed session) can still name it. -
serverId
String serverId
-
-
-
Package org.jenkins.plugins.lockableresources.util
-
Class org.jenkins.plugins.lockableresources.util.SerializableSecureGroovyScript
class SerializableSecureGroovyScript extends Object implements Serializable- serialVersionUID:
- 1L
-