Package hudson.slaves
Class WorkspaceList.Lease
java.lang.Object
hudson.slaves.WorkspaceList.Lease
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- WorkspaceList
Represents a leased workspace that needs to be returned later.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
By default, callsrelease()
, but should be idempotent.static WorkspaceList.Lease
Creates a dummyWorkspaceList.Lease
object that does no-op in the release.static WorkspaceList.Lease
createLinkedDummyLease
(FilePath p, WorkspaceList.Lease parent) Creates aWorkspaceList.Lease
object that points to the specified path, but the lock is controlled by the given parent lease object.abstract void
release()
Releases this lease.
-
Field Details
-
path
-
-
Constructor Details
-
Lease
-
-
Method Details
-
release
public abstract void release()Releases this lease. -
close
public void close()By default, callsrelease()
, but should be idempotent.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Since:
- 1.600
-
createDummyLease
Creates a dummyWorkspaceList.Lease
object that does no-op in the release. -
createLinkedDummyLease
public static WorkspaceList.Lease createLinkedDummyLease(@NonNull FilePath p, WorkspaceList.Lease parent) Creates aWorkspaceList.Lease
object that points to the specified path, but the lock is controlled by the given parent lease object.
-