|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.slaves.WorkspaceList
public final class WorkspaceList
Used by Computer
to keep track of workspaces that are actively in use.
Computer.getWorkspaceList()
Nested Class Summary | |
---|---|
static class |
WorkspaceList.Entry
Book keeping for workspace allocation. |
static class |
WorkspaceList.Lease
Represents a leased workspace that needs to be returned later. |
Constructor Summary | |
---|---|
WorkspaceList()
|
Method Summary | |
---|---|
WorkspaceList.Lease |
acquire(FilePath p)
Acquires the given workspace. |
WorkspaceList.Lease |
acquire(FilePath p,
boolean quick)
See acquire(FilePath) |
WorkspaceList.Lease |
acquire(FilePath p,
boolean quick,
Object context)
See acquire(FilePath,boolean) |
WorkspaceList.Lease |
allocate(FilePath base)
Allocates a workspace by adding some variation to the given base to make it unique. |
WorkspaceList.Lease |
allocate(FilePath base,
Object context)
See allocate(FilePath) |
WorkspaceList.Lease |
record(FilePath p)
Just record that this workspace is being used, without paying any attention to the synchronization support. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkspaceList()
Method Detail |
---|
public WorkspaceList.Lease allocate(FilePath base) throws InterruptedException
This method doesn't block prolonged amount of time. Whenever a desired workspace is in use, the unique variation is added.
InterruptedException
public WorkspaceList.Lease allocate(FilePath base, Object context) throws InterruptedException
allocate(FilePath)
context
- Threads that share the same context can re-acquire the same lock (which will just increment the lock count.)
This allows related executors to share the same workspace.
InterruptedException
public WorkspaceList.Lease record(FilePath p)
public WorkspaceList.Lease acquire(FilePath p) throws InterruptedException
FilePath
as given to this method.
InterruptedException
public WorkspaceList.Lease acquire(FilePath p, boolean quick) throws InterruptedException
acquire(FilePath)
quick
- If true, indicates that the acquired workspace will be returned quickly.
This makes other calls to allocate(FilePath)
to wait for the release of this workspace.
InterruptedException
public WorkspaceList.Lease acquire(FilePath p, boolean quick, Object context) throws InterruptedException
acquire(FilePath,boolean)
context
- Threads that share the same context can re-acquire the same lock (which will just increment the lock count.)
This allows related executors to share the same workspace.
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |