當前位置: 首頁>>代碼示例>>Java>>正文


Java Node.Mode方法代碼示例

本文整理匯總了Java中hudson.model.Node.Mode方法的典型用法代碼示例。如果您正苦於以下問題:Java Node.Mode方法的具體用法?Java Node.Mode怎麽用?Java Node.Mode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在hudson.model.Node的用法示例。


在下文中一共展示了Node.Mode方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: DockerImage

import hudson.model.Node; //導入方法依賴的package包/類
@DataBoundConstructor
public DockerImage(String name, String labelString, Node.Mode mode, String instanceCapStr, String dockerImageName,
		String remoteFS, boolean pullForced, boolean pullDisabled, String userOverride, long cpuShares,
		boolean memoryLimited, long memoryLimitMB, boolean swapLimited, long swapLimitMB, boolean privileged,
		String workingDir, String volumes, List<? extends NodeProperty<?>> nodeProperties) throws IOException {
	this.name = name;
	this.labelString = labelString;
	this.mode = mode;
	this.dockerImageName = dockerImageName;
	this.remoteFS = remoteFS;

	this.pullForced = pullForced;
	this.pullDisabled = pullDisabled;
	this.userOverride = userOverride;

	this.cpuShares = cpuShares;

	this.memoryLimited = memoryLimited;
	this.memoryLimitMB = memoryLimitMB;
	this.swapLimited = swapLimited;
	this.swapLimitMB = swapLimitMB;

	this.privileged = privileged;

	this.workingDir = workingDir;

	this.volumes = volumes;

	if (instanceCapStr == null || "".equals(instanceCapStr)) {
		instanceCap = Integer.MAX_VALUE;
	} else {
		instanceCap = Integer.parseInt(instanceCapStr);
	}

	this.nodeProperties.replaceBy(nodeProperties);
}
 
開發者ID:kmbulebu,項目名稱:docker-ephemeral-cloud,代碼行數:37,代碼來源:DockerImage.java

示例2: doCheckLabelString

import hudson.model.Node; //導入方法依賴的package包/類
public FormValidation doCheckLabelString(@QueryParameter String value, @QueryParameter Node.Mode mode) {
    if (mode == Node.Mode.EXCLUSIVE && (value == null || value.trim() == "")) {
        return FormValidation.warning("You may want to assign labels to this node;" +
                " it's marked to only run jobs that are exclusively tied to itself or a label.");
    }

    return FormValidation.ok();
}
 
開發者ID:hudson3-plugins,項目名稱:ec2-plugin,代碼行數:9,代碼來源:SlaveTemplate.java

示例3: setUpCloud

import hudson.model.Node; //導入方法依賴的package包/類
private void setUpCloud(String label, Node.Mode mode) throws Exception{
	EC2Tag tag1 = new EC2Tag( "name1", "value1" );
	EC2Tag tag2 = new EC2Tag( "name2", "value2" );
	List<EC2Tag> tags = new ArrayList<EC2Tag>();
	tags.add( tag1 );
	tags.add( tag2 );

	SlaveTemplate template = new SlaveTemplate("ami", "foo", null, "default", "zone", InstanceType.M1Large, label, mode,"foo ami", "bar", "bbb", "aaa", "10", "fff", null, "-Xmx1g", true, "subnet 456", tags, null, false, null, "", false, false, null, false, "");
	List<SlaveTemplate> templates = new ArrayList<SlaveTemplate>();
	templates.add(template);

	ac = new AmazonEC2Cloud("us-east-1", false, "abc", "def", "us-east-1", "ghi", "3", templates);
}
 
開發者ID:hudson3-plugins,項目名稱:ec2-plugin,代碼行數:14,代碼來源:TemplateLabelsTest.java

示例4: getMode

import hudson.model.Node; //導入方法依賴的package包/類
@Override
public Node.Mode getMode()
{
	return useAsBuilder ? Node.Mode.NORMAL : Node.Mode.EXCLUSIVE;
}
 
開發者ID:Parallels,項目名稱:jenkins-parallels,代碼行數:6,代碼來源:ParallelsDesktopConnectorSlave.java

示例5: getMode

import hudson.model.Node; //導入方法依賴的package包/類
public Node.Mode getMode() {
	return mode;
}
 
開發者ID:kmbulebu,項目名稱:docker-ephemeral-cloud,代碼行數:4,代碼來源:DockerImage.java

示例6: setMode

import hudson.model.Node; //導入方法依賴的package包/類
@DataBoundSetter
public void setMode(Node.Mode mode) {
	this.mode = mode;
}
 
開發者ID:kmbulebu,項目名稱:docker-ephemeral-cloud,代碼行數:5,代碼來源:DockerImage.java

示例7: setMode

import hudson.model.Node; //導入方法依賴的package包/類
@DataBoundSetter
public void setMode(Node.Mode mode) {
    this.mode = mode;
}
 
開發者ID:KostyaSha,項目名稱:yet-another-docker-plugin,代碼行數:5,代碼來源:DockerSlaveConfig.java

示例8: getMode

import hudson.model.Node; //導入方法依賴的package包/類
public Node.Mode getMode() {
    return mode;
}
 
開發者ID:KostyaSha,項目名稱:yet-another-docker-plugin,代碼行數:4,代碼來源:DockerSlaveConfig.java

示例9: SlaveTemplate

import hudson.model.Node; //導入方法依賴的package包/類
@DataBoundConstructor
public SlaveTemplate(String ami, String zone, SpotConfiguration spotConfig, String securityGroups, String remoteFS, InstanceType type, String labelString, Node.Mode mode, String description, String initScript, String tmpDir, String userData, String numExecutors, String remoteAdmin, AMITypeData amiType, String jvmopts, boolean stopOnTerminate, String subnetId, List<EC2Tag> tags, String idleTerminationMinutes, boolean usePrivateDnsName, String instanceCapStr, String iamInstanceProfile, boolean useEphemeralDevices, boolean useDedicatedTenancy, String launchTimeoutStr, boolean associatePublicIp, String customDeviceMapping, boolean connectBySSHProcess) {
    this.ami = ami;
    this.zone = zone;
    this.spotConfig = spotConfig;
    this.securityGroups = securityGroups;
    this.remoteFS = remoteFS;
    this.amiType = amiType;
    this.type = type;
    this.labels = Util.fixNull(labelString);
    this.mode = mode;
    this.description = description;
    this.initScript = initScript;
    this.tmpDir = tmpDir;
    this.userData = userData;
    this.numExecutors = Util.fixNull(numExecutors).trim();
    this.remoteAdmin = remoteAdmin;
    this.jvmopts = jvmopts;
    this.stopOnTerminate = stopOnTerminate;
    this.subnetId = subnetId;
    this.tags = tags;
    this.idleTerminationMinutes = idleTerminationMinutes;
    this.usePrivateDnsName = usePrivateDnsName;
    this.associatePublicIp = associatePublicIp;
    this.useDedicatedTenancy = useDedicatedTenancy;
    this.connectBySSHProcess = connectBySSHProcess;

    if (null == instanceCapStr || instanceCapStr.equals("")) {
        this.instanceCap = Integer.MAX_VALUE;
    } else {
        this.instanceCap = Integer.parseInt(instanceCapStr);
    }

    try {
        this.launchTimeout = Integer.parseInt(launchTimeoutStr);
    } catch (NumberFormatException nfe ) {
        this.launchTimeout = Integer.MAX_VALUE;
    }

    this.iamInstanceProfile = iamInstanceProfile;
    this.useEphemeralDevices = useEphemeralDevices;
    this.customDeviceMapping = customDeviceMapping;

    readResolve(); // initialize
}
 
開發者ID:hudson3-plugins,項目名稱:ec2-plugin,代碼行數:46,代碼來源:SlaveTemplate.java


注:本文中的hudson.model.Node.Mode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。