本文整理匯總了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);
}
示例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();
}
示例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);
}
示例4: getMode
import hudson.model.Node; //導入方法依賴的package包/類
@Override
public Node.Mode getMode()
{
return useAsBuilder ? Node.Mode.NORMAL : Node.Mode.EXCLUSIVE;
}
示例5: getMode
import hudson.model.Node; //導入方法依賴的package包/類
public Node.Mode getMode() {
return mode;
}
示例6: setMode
import hudson.model.Node; //導入方法依賴的package包/類
@DataBoundSetter
public void setMode(Node.Mode mode) {
this.mode = mode;
}
示例7: setMode
import hudson.model.Node; //導入方法依賴的package包/類
@DataBoundSetter
public void setMode(Node.Mode mode) {
this.mode = mode;
}
示例8: getMode
import hudson.model.Node; //導入方法依賴的package包/類
public Node.Mode getMode() {
return mode;
}
示例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
}