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 void
close()
By default, callsrelease()
, but should be idempotent.static WorkspaceList.Lease
createDummyLease(FilePath p)
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 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Since:
- 1.600
-
createDummyLease
public static WorkspaceList.Lease createDummyLease(@NonNull FilePath p)
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.
-
-