Enum PlacementGroupStrategy
- All Implemented Interfaces:
Serializable
,Comparable<PlacementGroupStrategy>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:30.146Z")
@Stability(Stable)
public enum PlacementGroupStrategy
extends Enum<PlacementGroupStrategy>
Which strategy to use when launching instances.
Example:
InstanceType instanceType; PlacementGroup pg = PlacementGroup.Builder.create(this, "test-pg") .strategy(PlacementGroupStrategy.SPREAD) .build(); Instance.Builder.create(this, "Instance") .vpc(vpc) .instanceType(instanceType) .machineImage(MachineImage.latestAmazonLinux2023()) .placementGroup(pg) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPacks instances close together inside an Availability Zone.Spreads your instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups of instances in different partitions.Strictly places a small group of instances across distinct underlying hardware to reduce correlated failures. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlacementGroupStrategy
Returns the enum constant of this type with the specified name.static PlacementGroupStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CLUSTER
Packs instances close together inside an Availability Zone.This strategy enables workloads to achieve the low-latency network performance necessary for tightly-coupled node-to-node communication that is typical of high-performance computing (HPC) applications.
-
PARTITION
Spreads your instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups of instances in different partitions.This strategy is typically used by large distributed and replicated workloads, such as Hadoop, Cassandra, and Kafka.
-
SPREAD
Strictly places a small group of instances across distinct underlying hardware to reduce correlated failures.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-