org.jenkinsci.plugins.mesos
Class MesosCloud
java.lang.Object
hudson.model.AbstractModelObject
hudson.slaves.Cloud
org.jenkinsci.plugins.mesos.MesosCloud
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.slaves.Cloud>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled
public class MesosCloud
- extends hudson.slaves.Cloud
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Fields inherited from class hudson.slaves.Cloud |
ALL, name, PROVISION |
| Methods inherited from class hudson.slaves.Cloud |
all, checkPermission, getACL, getDisplayName, getSearchUrl, hasPermission |
| Methods inherited from class hudson.model.AbstractModelObject |
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MesosCloud
@DataBoundConstructor
public MesosCloud(String nativeLibraryPath,
String master,
String description,
String frameworkName,
List<MesosSlaveInfo> slaveInfos,
boolean checkpoint,
boolean onDemandRegistration)
throws NumberFormatException
- Throws:
NumberFormatException
init
@Initializer(after=JOB_LOADED)
public static void init()
- We want to start the Mesos scheduler as part of the initialization of Jenkins
and after the cloud class values have been restored from persistence.If this is
the very first time, this method will be NOOP as MesosCloud is not registered yet.
restartMesos
public void restartMesos()
provision
public Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label,
int excessWorkload)
- Specified by:
provision in class hudson.slaves.Cloud
getSlaveInfos
public List<MesosSlaveInfo> getSlaveInfos()
setSlaveInfos
public void setSlaveInfos(List<MesosSlaveInfo> slaveInfos)
canProvision
public boolean canProvision(hudson.model.Label label)
- Specified by:
canProvision in class hudson.slaves.Cloud
getNativeLibraryPath
public String getNativeLibraryPath()
setNativeLibraryPath
public void setNativeLibraryPath(String nativeLibraryPath)
getMaster
public String getMaster()
setMaster
public void setMaster(String master)
getDescription
public String getDescription()
setDescription
public void setDescription(String description)
getFrameworkName
public String getFrameworkName()
setFrameworkName
public void setFrameworkName(String frameworkName)
isOnDemandRegistration
public boolean isOnDemandRegistration()
setOnDemandRegistration
public void setOnDemandRegistration(boolean onDemandRegistration)
getDescriptor
public MesosCloud.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<hudson.slaves.Cloud>- Overrides:
getDescriptor in class hudson.slaves.Cloud
get
public static MesosCloud get()
isCheckpoint
public boolean isCheckpoint()
- Returns:
- the checkpoint
getSlaveAttributeForLabel
public net.sf.json.JSONObject getSlaveAttributeForLabel(String labelName)
- Retrieves the slaveattribute corresponding to label name.
- Parameters:
Jenkins - label name.
- Returns:
- slaveattribute as a JSONObject.
Copyright © 2004-2014. All Rights Reserved.