Class RemoteClientRegistry
java.lang.Object
org.jenkins.plugins.lockableresources.remote.RemoteClientRegistry
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension
public class RemoteClientRegistry
extends Object
What this controller currently holds or waits for on other controllers.
The client side of a remote lock lives in a RemoteLockSession per lock() step,
which is enough to run the step but leaves nobody able to answer "what is this controller doing
remotely right now?" - the question the lockable resources page exists to answer for local
resources. This registry is that answer: the client-side counterpart of the server-side
RemoteLockManager.
It is deliberately not persisted. A remote lock does not survive a restart of this controller
(the session either resumes polling or fails closed), so a stale entry read from disk could only
ever be wrong; RemoteLockSession.onResume re-registers what genuinely survived.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOne remote lock this controller holds or waits for. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPromotes a waiting entry to held, naming the resources the remote handed over.voidForgets an entry once the lock is released, skipped or failed.static RemoteClientRegistryget()getAll()Everything this controller holds or waits for, held entries first, then oldest first.booleanisEmpty()voidRecords a request that has been accepted by the remote and is waiting for its resources.
-
Constructor Details
-
RemoteClientRegistry
public RemoteClientRegistry()
-
-
Method Details
-
get
-
queued
public void queued(@NonNull String lockId, @NonNull String serverId, @NonNull String request, @CheckForNull Run<?, ?> build) Records a request that has been accepted by the remote and is waiting for its resources. -
acquired
Promotes a waiting entry to held, naming the resources the remote handed over. -
forget
Forgets an entry once the lock is released, skipped or failed. -
getAll
Everything this controller holds or waits for, held entries first, then oldest first. -
forServer
-
isEmpty
public boolean isEmpty()
-