public abstract class CloudProvisioningListener extends Object implements ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
CloudProvisioningListener() |
| Modifier and Type | Method and Description |
|---|---|
static ExtensionList<CloudProvisioningListener> |
all()
All the registered
CloudProvisioningListeners. |
CauseOfBlockage |
canProvision(Cloud cloud,
Label label,
int numExecutors)
Allows extensions to prevent a cloud from provisioning.
|
void |
onComplete(NodeProvisioner.PlannedNode plannedNode,
Node node)
Called when the
NodeProvisioner.PlannedNode.future completes. |
void |
onFailure(NodeProvisioner.PlannedNode plannedNode,
Throwable t)
Called when
NodeProvisioner.PlannedNode#future#get() throws an exception. |
void |
onStarted(Cloud cloud,
Label label,
Collection<NodeProvisioner.PlannedNode> plannedNodes)
Called after a cloud has returned a PlannedNode, but before
that node is necessarily ready for connection.
|
public CauseOfBlockage canProvision(Cloud cloud, Label label, int numExecutors)
cloud - The cloud being provisioned from.label - The label which requires additional capacity. IE,
the NodeProvisioner.label.
May be null if provisioning for unlabeled builds.numExecutors - The number of executors needed.null if provisioning can proceed, or a
CauseOfBlockage reason why it cannot be provisioned.public void onStarted(Cloud cloud, Label label, Collection<NodeProvisioner.PlannedNode> plannedNodes)
cloud - the cloud doing the provisioninglabel - the label which requires additional capacity. IE,
the NodeProvisioner.label
May be null if provisioning for unlabeled builds.plannedNodes - the planned nodespublic void onComplete(NodeProvisioner.PlannedNode plannedNode, Node node)
NodeProvisioner.PlannedNode.future completes.plannedNode - the plannedNode which resulted in the node being provisionednode - the node which has been provisioned by the cloudpublic void onFailure(NodeProvisioner.PlannedNode plannedNode, Throwable t)
NodeProvisioner.PlannedNode#future#get() throws an exception.plannedNode - the planned node which failed to launcht - the exceptionpublic static ExtensionList<CloudProvisioningListener> all()
CloudProvisioningListeners.Copyright © 2019. All rights reserved.