Class RemoteQueueEntry
java.lang.Object
org.jenkins.plugins.lockableresources.remote.RemoteQueueEntry
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class RemoteQueueEntry
extends Object
Remote-lock counterpart to
QueuedContextStruct.
Holds a pending remote acquire request in the LRM queue so that remote locks participate in the same
priority-sorted queue as local pipeline lock() steps. The request's requirements are carried as
the same LockableResourcesStruct list local lock() uses, so queue promotion resolves through the
canonical getAvailableResources path.
All access must be under LockableResourcesManager.syncResources.
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteQueueEntry(RemoteLockRecord record, List<LockableResourcesStruct> structs, int priority, long timeoutForAllocateResource, String timeoutUnit) -
Method Summary
Modifier and TypeMethodDescriptionintlongbooleanbooleanisValid()voidonAcquired(List<LockableResource> resources) Called whenresourceshave been allocated.voidCalled when the queue timeout expires.voidsetResolved(List<LockableResource> resolved) toString()
-
Constructor Details
-
RemoteQueueEntry
public RemoteQueueEntry(@NonNull RemoteLockRecord record, @NonNull List<LockableResourcesStruct> structs, int priority, long timeoutForAllocateResource, @NonNull String timeoutUnit)
-
-
Method Details
-
getRecord
-
getStructs
-
getLockId
-
getPriority
public int getPriority() -
getTimeoutDeadlineMillis
public long getTimeoutDeadlineMillis() -
getResolved
-
setResolved
-
isValid
public boolean isValid() -
isTimedOut
public boolean isTimedOut() -
onAcquired
Called whenresourceshave been allocated. Transitions the record to ACQUIRED and buildslockEnvVars(including resource-property env vars) viaRemoteResolver.remoteLockEnvVars(java.lang.String, java.util.List<org.jenkins.plugins.lockableresources.LockableResource>)- the same helper the immediate-acquire path uses, so both paths produce identical env vars (shared with locallock()throughLockStepExecution.buildLockEnvVars). -
onTimeout
public void onTimeout()Called when the queue timeout expires. Transitions the record to FAILED. -
getLockRequest
-
toString
-