com.atlassian.bamboo.repository
Interface CachingAwareRepository

All Superinterfaces:
BambooPluginModule, BuildConfigurationAwarePlugin, ConfigurablePlugin, ConvertibleFromConfig, DescriptionProvider, InitablePluginModule, NameProvider, RenderableBuildConfiguration, Repository, RepositoryV2, Serializable
All Known Subinterfaces:
BitbucketDelegatedRepository
All Known Implementing Classes:
BitbucketRepository, GitHubRepository, GitRepository, HgRepository, StashRepository, SvnRepository

public interface CachingAwareRepository
extends Repository

Should be implemented by repositories supporting caching of its method calls.


Nested Class Summary
static class CachingAwareRepository.CachableOperation
           
 
Field Summary
 
Fields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOST
 
Method Summary
 CacheId getCacheId(CachingAwareRepository.CachableOperation cachableOperation)
          Cache id has to fulfill the following: Given two Repository objects A and B, returning equal CacheId (in terms of equals()) and a cachable operation foo(), in the following sequence of calls made in a short time period: 1.
 boolean isCachingSupportedFor(CachingAwareRepository.CachableOperation cachableOperation)
           
 
Methods inherited from interface com.atlassian.bamboo.repository.Repository
checkConnection, getHost, getKey, getLocationIdentifier, getMinimalEditHtml, getName, getShortKey
 
Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
 
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
collectChangesSinceLastBuild, getSourceCodeDirectory, isRepositoryDifferent
 
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
 
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
addDefaultValues, prepareConfigObject, validate
 
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
 
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getEditHtml, getViewHtml
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 

Method Detail

getCacheId

@Nullable
CacheId getCacheId(@NotNull
                            CachingAwareRepository.CachableOperation cachableOperation)
Cache id has to fulfill the following: Given two Repository objects A and B, returning equal CacheId (in terms of equals()) and a cachable operation foo(), in the following sequence of calls made in a short time period: 1. A::foo() 2. B::foo() 3. A::foo() the result of B::foo() should be the same as either the first or the second call to A::foo().

Returns:
the cache id of repository, null if the supplied operation cannot be cached

isCachingSupportedFor

boolean isCachingSupportedFor(@NotNull
                              CachingAwareRepository.CachableOperation cachableOperation)
Returns:
true if the repository supports generation of CacheIds for a given operation


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.