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

All Superinterfaces:
BambooObjectDao, bucket.core.persistence.ObjectDao
All Known Implementing Classes:
ElasticImageConfigurationHibernateDao

public interface ElasticImageConfigurationDao
extends BambooObjectDao


Method Summary
 ElasticImageConfiguration findById(long id)
          Get Elastic Image Configuration from its id
 java.util.List<ElasticImageConfiguration> getAll()
          Get all Elastic Image Configuration objects
 int getBuildCountForImageConfigurationId(long id)
          Get the number of elastic agents associated with a given image configuration
 int getElasticAgentCountForImageConfigurationId(long id)
          Returns all elastic agents associated with a specific image configuration
 java.util.List<ElasticAgentDefinition> getElasticAgentsForImageConfigurationId(long id)
          Retrieves a list of elastic agenst associated with the given elastic image configuration
 java.util.List<ElasticImageConfiguration> getElasticImageConfigurationByAmi(java.lang.String amiId)
          Retrieves a list of all elastic image configurations that use a specific image.
 ElasticImageConfiguration getElasticImageConfigurationByName(java.lang.String name)
          Finds an elastic configuration by name.
 java.util.List<ElasticImageConfiguration> getImages(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType rootDeviceType, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture architectureType, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform platform, java.lang.Boolean shippedWithBamboo)
           
 ElasticImageConfiguration getShippedWithBamboo()
          Deprecated. since 3.3 use #getImages(AwsSupportConstants.Region, AwsSupportConstants.RootDeviceType, AwsSupportConstants.ArchitectureType, AwsSupportConstants.Platform, boolean
 void remove(ElasticImageConfiguration elasticImageConfiguration)
           
 void save(ElasticImageConfiguration elasticImageConfiguration)
           
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

getAll

@NotNull
java.util.List<ElasticImageConfiguration> getAll()
Get all Elastic Image Configuration objects

Returns:
Collection of Elastic Image Configuration objects (empty if none found)

findById

@Nullable
ElasticImageConfiguration findById(long id)
Get Elastic Image Configuration from its id

Specified by:
findById in interface BambooObjectDao
Parameters:
id - Elastic Image Configuration's id
Returns:
Elastic Image Configuration object or null if not found

getElasticAgentCountForImageConfigurationId

int getElasticAgentCountForImageConfigurationId(long id)
Returns all elastic agents associated with a specific image configuration

Parameters:
id - for the image configuration
Returns:
count of the elastic agent associated with the given image configuration

getBuildCountForImageConfigurationId

int getBuildCountForImageConfigurationId(long id)
Get the number of elastic agents associated with a given image configuration

Parameters:
id - for the image configuration
Returns:
count of the builds associated with the given image configuration

getElasticImageConfigurationByName

@Nullable
ElasticImageConfiguration getElasticImageConfigurationByName(java.lang.String name)
Finds an elastic configuration by name.

Parameters:
name - to look for
Returns:
the elasticConfig with the given name.

save

void save(@NotNull
          ElasticImageConfiguration elasticImageConfiguration)

remove

void remove(@NotNull
            ElasticImageConfiguration elasticImageConfiguration)

getShippedWithBamboo

@Nullable
@Deprecated
ElasticImageConfiguration getShippedWithBamboo()
Deprecated. since 3.3 use #getImages(AwsSupportConstants.Region, AwsSupportConstants.RootDeviceType, AwsSupportConstants.ArchitectureType, AwsSupportConstants.Platform, boolean

Returns:

getImages

@NotNull
java.util.List<ElasticImageConfiguration> getImages(@Nullable
                                                            com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region,
                                                            @Nullable
                                                            com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType rootDeviceType,
                                                            @Nullable
                                                            com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture architectureType,
                                                            @Nullable
                                                            com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform platform,
                                                            @Nullable
                                                            java.lang.Boolean shippedWithBamboo)

getElasticAgentsForImageConfigurationId

java.util.List<ElasticAgentDefinition> getElasticAgentsForImageConfigurationId(long id)
Retrieves a list of elastic agenst associated with the given elastic image configuration

Parameters:
id - of the elasticImageConfiguration
Returns:
List

getElasticImageConfigurationByAmi

java.util.List<ElasticImageConfiguration> getElasticImageConfigurationByAmi(java.lang.String amiId)
Retrieves a list of all elastic image configurations that use a specific image.

Parameters:
amiId - to filter with
Returns:
list of ElasticAgentDefinition objects that use the given amiID


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.