com.atlassian.bamboo.agent.elastic.server
Class SpotInstanceConfig

java.lang.Object
  extended by com.atlassian.bamboo.agent.elastic.server.SpotInstanceConfig
All Implemented Interfaces:
java.io.Serializable

public class SpotInstanceConfig
extends java.lang.Object
implements java.io.Serializable

This class holds spot instance configuration

See Also:
Serialized Form

Field Summary
static SpotInstanceConfig DEFAULT_SPOT_INSTANCE_CONFIG
           
 
Method Summary
 com.atlassian.aws.ec2.SpotPriceMatrix.Price getBid(java.lang.String product, com.amazonaws.services.ec2.model.InstanceType instanceType)
          Retrieves the currently configured bid for spot instance.
 com.atlassian.aws.ec2.SpotPriceMatrix getBidLevels()
          Retrieves current bid matrix
 int getSpotRequestTimeoutSeconds()
          Getter for spot request timeout
 boolean isEnabled()
          This methods checks if spot instance functionality is enabled
 void setBid(java.lang.String product, com.amazonaws.services.ec2.model.InstanceType instanceType, double value)
          Setter for current bid for spot instance
 void setEnabled(boolean value)
          Setter for spot instance functionality
 void setSpotRequestTimeoutSeconds(int spotRequestTimeoutSeconds)
          Setter for spot request timeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SPOT_INSTANCE_CONFIG

public static final SpotInstanceConfig DEFAULT_SPOT_INSTANCE_CONFIG
Method Detail

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

Parameters:
value -

getBid

@Nullable
public com.atlassian.aws.ec2.SpotPriceMatrix.Price getBid(@NotNull
                                                                   java.lang.String product,
                                                                   com.amazonaws.services.ec2.model.InstanceType instanceType)
Retrieves the currently configured bid for spot instance.

Parameters:
product - the product for which the spot price is requested
instanceType - the instance type for which the spot price is requested
Returns:
current bid

setBid

public void setBid(java.lang.String product,
                   com.amazonaws.services.ec2.model.InstanceType instanceType,
                   double value)
Setter for current bid for spot instance

Parameters:
product - the product for which the spot price is requested
instanceType - the instance type for which the spot price is requested
value - 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



Copyright © 2012 Atlassian. All Rights Reserved.