public class LeaseContext extends Object
One instance is created per lease on the master to keep track of leases and what executors are assigned to them.
| Modifier and Type | Field and Description |
|---|---|
String |
id
Unique identifier of the lease.
|
String |
owner
User name who created it.
|
| Constructor and Description |
|---|
LeaseContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String alias,
hudson.model.Label label,
String displayName,
long duration) |
void |
checkOwner() |
void |
end()
Cancels all the in-progress tasks.
|
hudson.model.Executor |
get(String alias)
Gets the
Executor that maps to the alias. |
Set<String> |
getAliases() |
static LeaseContext |
getById(String id) |
void |
remove(String alias)
Removes a single alias.
|
void |
waitForStart()
Waits for all the active leases to get their executors assigned.
|
public final String id
public final String owner
public static LeaseContext getById(String id)
public void checkOwner()
throws hudson.AbortException
hudson.AbortExceptionpublic void waitForStart()
throws ExecutionException,
InterruptedException
public hudson.model.Executor get(String alias) throws InterruptedException, IOException
Executor that maps to the alias.InterruptedExceptionIOExceptionpublic void end()
public void remove(String alias)
Copyright © 2004-2013. All Rights Reserved.