Class QueuedContextStruct
java.lang.Object
org.jenkins.plugins.lockableresources.queue.QueuedContextStruct
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQueuedContextStruct(org.jenkinsci.plugins.workflow.steps.StepContext context, List<LockableResourcesStruct> lockableResourcesStruct, String resourceDescription, String variableName, int priority) QueuedContextStruct(org.jenkinsci.plugins.workflow.steps.StepContext context, List<LockableResourcesStruct> lockableResourcesStruct, String resourceDescription, String variableName, int priority, String reason, long timeoutForAllocateResource, String timeoutUnit) -
Method Summary
Modifier and TypeMethodDescriptionintcompare(QueuedContextStruct other) Run<?, ?> getBuild()Return build, where is the resource used.org.jenkinsci.plugins.workflow.steps.StepContextgetId()intlongReturns the pre-computed deadline (epoch millis) when this entry times out.longReturns the configured timeout for resource allocation.Returns the time unit for the allocation timeout.booleanChecks whether this queued context has exceeded its allocation timeout.booleanisValid()toString()
-
Field Details
-
candidates
-
-
Constructor Details
-
QueuedContextStruct
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public QueuedContextStruct(org.jenkinsci.plugins.workflow.steps.StepContext context, List<LockableResourcesStruct> lockableResourcesStruct, String resourceDescription, String variableName, int priority) -
QueuedContextStruct
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public QueuedContextStruct(org.jenkinsci.plugins.workflow.steps.StepContext context, List<LockableResourcesStruct> lockableResourcesStruct, String resourceDescription, String variableName, int priority, String reason, long timeoutForAllocateResource, String timeoutUnit)
-
-
Method Details
-
compare
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public int compare(QueuedContextStruct other) -
getPriority
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public int getPriority() -
getId
-
getContext
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public org.jenkinsci.plugins.workflow.steps.StepContext getContext() -
getBuild
@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Run<?,?> getBuild()Return build, where is the resource used. -
isValid
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isValid() -
getResources
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<LockableResourcesStruct> getResources() -
getResourceDescription
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getResourceDescription() -
getVariableName
-
isTimedOut
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isTimedOut()Checks whether this queued context has exceeded its allocation timeout. Uses a pre-computed deadline for performance since this is called on every queue check.- Returns:
- true if a timeout was set and has expired, false otherwise
-
getTimeoutDeadlineMillis
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public long getTimeoutDeadlineMillis()Returns the pre-computed deadline (epoch millis) when this entry times out. 0 means no timeout is configured. -
getTimeoutForAllocateResource
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public long getTimeoutForAllocateResource()Returns the configured timeout for resource allocation. -
getTimeoutUnit
Returns the time unit for the allocation timeout. -
getReason
-
toString
-
getLogger
-