本文整理了Java中com.amazonaws.services.ec2.model.Placement
类的一些代码示例,展示了Placement
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Placement
类的具体详情如下:
包路径:com.amazonaws.services.ec2.model.Placement
类名称:Placement
[英]Describes the placement of an instance.
[中]描述实例的位置。
代码示例来源:origin: aws/aws-sdk-java
public Placement unmarshall(StaxUnmarshallerContext context) throws Exception {
Placement placement = new Placement();
int originalDepth = context.getCurrentDepth();
int targetDepth = originalDepth + 1;
placement.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setAffinity(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setGroupName(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setPartitionNumber(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setHostId(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setTenancy(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setSpreadDomain(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
代码示例来源:origin: aws/aws-sdk-java
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getAffinity() == null) ? 0 : getAffinity().hashCode());
hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode());
hashCode = prime * hashCode + ((getPartitionNumber() == null) ? 0 : getPartitionNumber().hashCode());
hashCode = prime * hashCode + ((getHostId() == null) ? 0 : getHostId().hashCode());
hashCode = prime * hashCode + ((getTenancy() == null) ? 0 : getTenancy().hashCode());
hashCode = prime * hashCode + ((getSpreadDomain() == null) ? 0 : getSpreadDomain().hashCode());
return hashCode;
}
代码示例来源:origin: h2oai/h2o-2
run.withMinCount(launchCount).withMaxCount(launchCount);
run.withSecurityGroupIds(securityGroup);
Placement placement = new Placement();
placement.setGroupName(USER);
run.withPlacement(placement);
BlockDeviceMapping map = new BlockDeviceMapping();
代码示例来源:origin: apache/usergrid
runInstancesRequest = runInstancesRequest.withPlacement( new Placement( stack.getDataCenter() ) );
client.setEndpoint( AmazonUtils.getEndpoint( stack.getDataCenter() ) );
代码示例来源:origin: aws-amplify/aws-sdk-android
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode());
hashCode = prime * hashCode + ((getTenancy() == null) ? 0 : getTenancy().hashCode());
hashCode = prime * hashCode + ((getHostId() == null) ? 0 : getHostId().hashCode());
hashCode = prime * hashCode + ((getAffinity() == null) ? 0 : getAffinity().hashCode());
return hashCode;
}
代码示例来源:origin: aws-amplify/aws-sdk-android
public Placement unmarshall(StaxUnmarshallerContext context) throws Exception {
Placement placement = new Placement();
int originalDepth = context.getCurrentDepth();
int targetDepth = originalDepth + 1;
placement.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setGroupName(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setTenancy(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setHostId(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
placement.setAffinity(StringStaxUnmarshaller.getInstance().unmarshall(context));
continue;
代码示例来源:origin: org.jenkins-ci.plugins/ec2
Placement placement = new Placement(getZone());
if (getUseDedicatedTenancy()) {
placement.setTenancy("dedicated");
代码示例来源:origin: UrbanCode/terraform
Placement placement = new Placement().withAvailabilityZone(zone);
request = request.withPlacement(placement);
代码示例来源:origin: com.proofpoint.galaxy/galaxy-coordinator
public static String getLocation(com.amazonaws.services.ec2.model.Instance instance, String role)
{
String zone = instance.getPlacement().getAvailabilityZone();
String region = zone.substring(0, zone.length() - 1);
return Joiner.on('/').join("", "ec2", region, zone, instance.getInstanceId(), role);
}
代码示例来源:origin: airbnb/billow
this.lifecycle = instance.getInstanceLifecycle();
this.hypervisor = instance.getHypervisor();
this.az = instance.getPlacement().getAvailabilityZone();
this.group = instance.getPlacement().getGroupName();
this.tenancy = instance.getPlacement().getTenancy();
this.vpc = instance.getVpcId();
this.platform = instance.getPlatform();
代码示例来源:origin: aws/aws-sdk-java
/**
* <p>
* The name of the placement group the instance is in.
* </p>
*
* @param groupName
* The name of the placement group the instance is in.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Placement withGroupName(String groupName) {
setGroupName(groupName);
return this;
}
代码示例来源:origin: aws/aws-sdk-java
/**
* <p>
* The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of
* <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for the
* <a>ImportInstance</a> command.
* </p>
*
* @param tenancy
* The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of
* <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for
* the <a>ImportInstance</a> command.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Tenancy
*/
public Placement withTenancy(String tenancy) {
setTenancy(tenancy);
return this;
}
代码示例来源:origin: org.apache.airavata/airavata-xbaya-gui
/**
* @see org.apache.airavata.xbaya.ui.widgets.TableRenderable#getValue(int)
*/
@Override
public Object getValue(int index) {
switch (index) {
case 0:
return this.instance.getInstanceId();
case 1:
return this.instance.getImageId();
case 2:
return this.instance.getRootDeviceType();
case 3:
return this.instance.getInstanceType();
case 4:
return this.instance.getState().getName();
case 5:
return this.instance.getKeyName();
case 6:
return this.instance.getMonitoring().getState();
case 7:
return this.instance.getVirtualizationType();
case 8:
return this.instance.getPlacement().getGroupName();
default:
return null;
}
}
代码示例来源:origin: apache/usergrid
runInstancesRequest = runInstancesRequest.withPlacement( new Placement( stack.getDataCenter() ) );
client.setEndpoint( AmazonUtils.getEndpoint( stack.getDataCenter() ) );
代码示例来源:origin: aws-amplify/aws-sdk-android
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof Placement == false) return false;
Placement other = (Placement)obj;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false;
if (other.getGroupName() == null ^ this.getGroupName() == null) return false;
if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false) return false;
if (other.getTenancy() == null ^ this.getTenancy() == null) return false;
if (other.getTenancy() != null && other.getTenancy().equals(this.getTenancy()) == false) return false;
if (other.getHostId() == null ^ this.getHostId() == null) return false;
if (other.getHostId() != null && other.getHostId().equals(this.getHostId()) == false) return false;
if (other.getAffinity() == null ^ this.getAffinity() == null) return false;
if (other.getAffinity() != null && other.getAffinity().equals(this.getAffinity()) == false) return false;
return true;
}
代码示例来源:origin: jenkinsci/ec2-plugin
Placement placement = new Placement(getZone());
if (getUseDedicatedTenancy()) {
placement.setTenancy("dedicated");
代码示例来源:origin: airlift/airship
public static String getLocation(com.amazonaws.services.ec2.model.Instance instance, String role)
{
String zone = instance.getPlacement().getAvailabilityZone();
String region = zone.substring(0, zone.length() - 1);
return Joiner.on('/').join("", "ec2", region, zone, instance.getInstanceId(), role);
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2
/**
* <p>
* The name of the placement group the instance is in.
* </p>
*
* @param groupName
* The name of the placement group the instance is in.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Placement withGroupName(String groupName) {
setGroupName(groupName);
return this;
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2
/**
* <p>
* The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of
* <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for the
* <a>ImportInstance</a> command.
* </p>
*
* @param tenancy
* The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of
* <code>dedicated</code> runs on single-tenant hardware. The <code>host</code> tenancy is not supported for
* the <a>ImportInstance</a> command.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Tenancy
*/
public Placement withTenancy(String tenancy) {
setTenancy(tenancy);
return this;
}
代码示例来源:origin: aws/aws-sdk-java
return false;
Placement other = (Placement) obj;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
return false;
if (other.getAffinity() == null ^ this.getAffinity() == null)
return false;
if (other.getAffinity() != null && other.getAffinity().equals(this.getAffinity()) == false)
return false;
if (other.getGroupName() == null ^ this.getGroupName() == null)
return false;
if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false)
return false;
if (other.getPartitionNumber() == null ^ this.getPartitionNumber() == null)
return false;
if (other.getPartitionNumber() != null && other.getPartitionNumber().equals(this.getPartitionNumber()) == false)
return false;
if (other.getHostId() == null ^ this.getHostId() == null)
return false;
if (other.getHostId() != null && other.getHostId().equals(this.getHostId()) == false)
return false;
if (other.getTenancy() == null ^ this.getTenancy() == null)
return false;
if (other.getTenancy() != null && other.getTenancy().equals(this.getTenancy()) == false)
return false;
if (other.getSpreadDomain() == null ^ this.getSpreadDomain() == null)
return false;
if (other.getSpreadDomain() != null && other.getSpreadDomain().equals(this.getSpreadDomain()) == false)
内容来源于网络,如有侵权,请联系作者删除!