com.atlassian.bamboo.agent.elastic.server
Interface ElasticFunctionalityFacade

All Known Implementing Classes:
ElasticFunctionalityFacadeImpl

public interface ElasticFunctionalityFacade

Facade that orchestrates EC2 related functionalities


Field Summary
static int DEFAULT_ALLOWED_AGENTS
           
static java.lang.String ELASTIC_BAMBOO_SECURITY_GROUP
           
 
Method Summary
 void addElasticLogEntry(java.lang.String logEntry)
           
 ElasticConfiguration getElasticConfig()
          Retrieve ElasticConfiguration object from persistent storage.
 int getMaxConcurrentInstances()
           
 java.lang.String getPkFileLocation()
           
 boolean isElasticSupportEnabled()
           
 boolean isElasticSupportPossible(ErrorCollection errorCollection)
           
 void persistElasticConfig(ElasticConfiguration elasticConfiguration)
          Persist ElasticConfiguration object.
 void recheckElasticSupportEnabledFlag()
           
 void setElasticSupportEnabled(boolean elasticSupportEnabled)
          Enable/disable Elastic Bamboo functionality
 void shutdownAllInstances()
           
 void shutdownInstance(RemoteElasticAgent elasticInstance)
           
 void shutdownInstance(java.lang.String instanceId)
           
 void startupAgents(int numAgentsRequired, com.atlassian.aws.ec2.EC2InstanceType instanceType)
           
 void updateAgentPendingStatus(java.lang.String instanceId)
          Set the agent pending status to true for the given instance id
 boolean validateAgentCreation(int numAgentsRequired, ErrorCollection errorCollection)
          Validates whether the requested number of agents can be created and adds any errors to the error collection.
 

Field Detail

ELASTIC_BAMBOO_SECURITY_GROUP

static final java.lang.String ELASTIC_BAMBOO_SECURITY_GROUP
See Also:
Constant Field Values

DEFAULT_ALLOWED_AGENTS

static final int DEFAULT_ALLOWED_AGENTS
See Also:
Constant Field Values
Method Detail

recheckElasticSupportEnabledFlag

void recheckElasticSupportEnabledFlag()

shutdownInstance

void shutdownInstance(@NotNull
                      RemoteElasticAgent elasticInstance)

shutdownInstance

void shutdownInstance(java.lang.String instanceId)
                      throws com.atlassian.aws.AWSException
Throws:
com.atlassian.aws.AWSException

shutdownAllInstances

void shutdownAllInstances()

startupAgents

void startupAgents(int numAgentsRequired,
                   @NotNull
                   com.atlassian.aws.ec2.EC2InstanceType instanceType)
                   throws com.atlassian.aws.AWSException
Throws:
com.atlassian.aws.AWSException

validateAgentCreation

boolean validateAgentCreation(int numAgentsRequired,
                              ErrorCollection errorCollection)
Validates whether the requested number of agents can be created and adds any errors to the error collection.

Parameters:
numAgentsRequired - - number of agents to be created
errorCollection - - error collection to add any validation errors to.

isElasticSupportEnabled

boolean isElasticSupportEnabled()
Returns:
true, if elastic support is turned on

setElasticSupportEnabled

void setElasticSupportEnabled(boolean elasticSupportEnabled)
Enable/disable Elastic Bamboo functionality

Parameters:
elasticSupportEnabled - Specifies if Elastc Baboo shall be enabled or disabled.

isElasticSupportPossible

boolean isElasticSupportPossible(@NotNull
                                 ErrorCollection errorCollection)
Returns:
true, if all preconditions for turning elastic support on are met

persistElasticConfig

void persistElasticConfig(@NotNull
                          ElasticConfiguration elasticConfiguration)
Persist ElasticConfiguration object.

Parameters:
elasticConfiguration -

getPkFileLocation

@NotNull
java.lang.String getPkFileLocation()

getElasticConfig

@Nullable
ElasticConfiguration getElasticConfig()
Retrieve ElasticConfiguration object from persistent storage.

Returns:

getMaxConcurrentInstances

int getMaxConcurrentInstances()
Returns:
max number of elastic instances allowed for this instance. It's based on license restrictions.

updateAgentPendingStatus

void updateAgentPendingStatus(java.lang.String instanceId)
Set the agent pending status to true for the given instance id

Parameters:
instanceId -

addElasticLogEntry

void addElasticLogEntry(java.lang.String logEntry)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.