Class SpotInstanceConfig
java.lang.Object
com.atlassian.bamboo.agent.elastic.server.SpotInstanceConfig
- All Implemented Interfaces:
Serializable
This class holds spot instance configuration
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.aws.ec2.SpotPriceMatrix.PricegetBid(@NotNull String product, software.amazon.awssdk.services.ec2.model.InstanceType instanceType) Retrieves the currently configured bid for spot instance.com.atlassian.aws.ec2.SpotPriceMatrixRetrieves current bid matrixintGetter for spot request timeoutbooleanThis methods checks if spot instance functionality is enabledvoidsetBid(String product, software.amazon.awssdk.services.ec2.model.InstanceType instanceType, double value) Setter for current bid for spot instancevoidsetEnabled(boolean value) Setter for spot instance functionalityvoidsetSpotRequestTimeoutSeconds(int spotRequestTimeoutSeconds) Setter for spot request timeout
-
Field Details
-
DEFAULT_SPOT_INSTANCE_CONFIG
-
-
Method Details
-
isEnabled
public boolean isEnabled()This methods checks if spot instance functionality is enabled- Returns:
- true if spot instance functionality is enabled
-
setEnabled
public void setEnabled(boolean value) Setter for spot instance functionality -
getBid
@Nullable public com.atlassian.aws.ec2.SpotPriceMatrix.Price getBid(@NotNull @NotNull String product, software.amazon.awssdk.services.ec2.model.InstanceType instanceType) Retrieves the currently configured bid for spot instance.- Parameters:
product- the product for which the spot price is requestedinstanceType- the instance type for which the spot price is requested- Returns:
- current bid
-
setBid
public void setBid(String product, software.amazon.awssdk.services.ec2.model.InstanceType instanceType, double value) Setter for current bid for spot instance- Parameters:
product- the product for which the spot price is requestedinstanceType- the instance type for which the spot price is requestedvalue- the value for bid
-
getBidLevels
public com.atlassian.aws.ec2.SpotPriceMatrix getBidLevels()Retrieves current bid matrix- Returns:
- bids
-
getSpotRequestTimeoutSeconds
public int getSpotRequestTimeoutSeconds()Getter for spot request timeout -
setSpotRequestTimeoutSeconds
public void setSpotRequestTimeoutSeconds(int spotRequestTimeoutSeconds) Setter for spot request timeout
-