Class RemoteLockRecord

java.lang.Object
org.jenkins.plugins.lockableresources.remote.RemoteLockRecord

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class RemoteLockRecord extends Object
Server-side record tracking a remote lock request lifecycle.

All state transitions are performed by RemoteLockManager's single-threaded tick executor, except for heartbeat() which is written by the HTTP thread. Fields are volatile to ensure visibility across threads.

  • Method Details

    • getLockId

      public String getLockId()
    • getLockRequest

      @NonNull public RemoteLockRequest getLockRequest()
    • getResourceName

      @CheckForNull public String getResourceName()
      Returns the first acquired resource name, or the requested resource name if not yet acquired. Returns null for label-only requests that have not yet been acquired.
    • getAcquiredResourceNames

      @CheckForNull public List<String> getAcquiredResourceNames()
    • getLockEnvVars

      @CheckForNull public Map<String,String> getLockEnvVars()
    • getClientId

      @CheckForNull public String getClientId()
    • getState

      public RemoteLockState getState()
    • getEnqueuedAt

      public long getEnqueuedAt()
    • getTerminalAt

      public long getTerminalAt()
      Instant the record became terminal (SKIPPED/FAILED), or 0 if still non-terminal.
    • getAcquiredAt

      public long getAcquiredAt()
    • getLastHeartbeatAt

      public long getLastHeartbeatAt()
    • getErrorCode

      @CheckForNull public String getErrorCode()