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 |
|
Constructor Summary |
MesosCloud(String nativeLibraryPath,
String master,
String description,
String frameworkName,
String slaveCpus,
int slaveMem,
int maxExecutors,
String executorCpus,
int executorMem,
int idleTerminationMinutes,
String slaveAttributes,
boolean checkpoint)
|
| 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,
String slaveCpus,
int slaveMem,
int maxExecutors,
String executorCpus,
int executorMem,
int idleTerminationMinutes,
String slaveAttributes,
boolean checkpoint)
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
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)
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()
getSlaveAttributes
public net.sf.json.JSONObject getSlaveAttributes()
- Returns:
- the slaveAttributes
isCheckpoint
public boolean isCheckpoint()
- Returns:
- the checkpoint
getSlaveCpus
public double getSlaveCpus()
- Returns:
- the slaveCpus
getSlaveMem
public int getSlaveMem()
- Returns:
- the slaveMem
getExecutorCpus
public double getExecutorCpus()
- Returns:
- the executorCpus
getMaxExecutors
public int getMaxExecutors()
- Returns:
- the maxExecutors
getExecutorMem
public int getExecutorMem()
- Returns:
- the executorMem
getIdleTerminationMinutes
public int getIdleTerminationMinutes()
- Returns:
- the idleTerminationMinutes
Copyright © 2004-2014. All Rights Reserved.