public abstract class JobRestriction extends Object implements hudson.ExtensionPoint, hudson.model.Describable<JobRestriction>, Serializable
Modifier and Type | Field and Description |
---|---|
static JobRestriction |
DEFAULT |
Constructor and Description |
---|
JobRestriction() |
Modifier and Type | Method and Description |
---|---|
static hudson.DescriptorExtensionList<JobRestriction,JobRestrictionDescriptor> |
all()
Get list of all registered
JobRestriction s. |
static List<JobRestrictionDescriptor> |
allDescriptors()
Returns list of
JobRestrictionDescriptor s. |
abstract boolean |
canTake(hudson.model.Queue.BuildableItem item)
Check if the
Queue item can be taken. |
abstract boolean |
canTake(hudson.model.Run run)
Check if the
Job can be executed according to the specified Run . |
JobRestrictionDescriptor |
getDescriptor() |
public static final JobRestriction DEFAULT
public abstract boolean canTake(@Nonnull hudson.model.Queue.BuildableItem item)
Queue
item can be taken.
This method is being used to check if the Node
can take the
specified job. If the job cannot be taken, Jenkins will try to launch
the job on other nodes.item
- An item to be checkedpublic abstract boolean canTake(@Nonnull hudson.model.Run run)
Job
can be executed according to the specified Run
.
If the job cannot be executed, it will be aborted by the plugin.run
- A Run
to be checkedpublic JobRestrictionDescriptor getDescriptor()
getDescriptor
in interface hudson.model.Describable<JobRestriction>
public static hudson.DescriptorExtensionList<JobRestriction,JobRestrictionDescriptor> all()
JobRestriction
s.JobRestriction
s.public static List<JobRestrictionDescriptor> allDescriptors()
JobRestrictionDescriptor
s.Copyright © 2016–2018. All rights reserved.