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