Package com.atlassian.bamboo.repository
Interface CachedRepositoryDefinitionManager
- All Superinterfaces:
CachedRepositoryDefinitionAccessor
@Internal
public interface CachedRepositoryDefinitionManager
extends CachedRepositoryDefinitionAccessor
Cached repository definition manager that should be use in 'system' context. It does no permission filtering.
As a rule, repositories that are marked for deletion are not included in returned collections but are accessible by id.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Disables cache.findRepositoriesByPluginKey
(String pluginKey) Returns all repositories with the given plugin keyRetrieve cache statisticsGet all linked and project repositories current user has permission to use in his plans.@NotNull Stream<VcsRepositoryData>
getProjectRepositories
(long projectId) Returns project repositories with the given project id In clustered mode, there is NO consistency guarantee.@NotNull Stream<VcsRepositoryData>
getProjectRepositoriesWithConsistencyGuarantee
(long projectId) Returns a cached project repositories.void
Loads all repositories into cache and enables cache.void
invalidate
(long repositoryId) Invalidates the repository and re-reads it into cache.void
remove
(long repositoryId) Removes given repository from cacheMethods inherited from interface com.atlassian.bamboo.repository.CachedRepositoryDefinitionAccessor
findAllTopLevelRepositoriesIds, findLinkedRepositoryByName, findProjectRepositoryByName, findRepositoriesByProjectId, getAllTopLevelRepositories, getLinkedRepositories, getLinkedRepositoriesForAdministration, getVcsRepositoriesDataWithConsistencyGuarantee, getVcsRepositoryData, getVcsRepositoryDataWithConsistencyGuarantee
-
Method Details
-
findRepositoriesByPluginKey
Returns all repositories with the given plugin key -
getProjectRepositories
Returns project repositories with the given project id In clustered mode, there is NO consistency guarantee.- Parameters:
projectId
- project id to get repositories for- Returns:
- stream of repositories
-
getProjectRepositoriesWithConsistencyGuarantee
@NotNull @NotNull Stream<VcsRepositoryData> getProjectRepositoriesWithConsistencyGuarantee(long projectId) Returns a cached project repositories. There is a guarantee that the data will be up-to-date.- Parameters:
projectId
- project id to get repositories for- Returns:
- stream of repositories
- Since:
- 9.4
-
getProjectAndLinkedRepositories
List<VcsRepositoryData> getProjectAndLinkedRepositories()Get all linked and project repositories current user has permission to use in his plans. -
invalidate
void invalidate(long repositoryId) Invalidates the repository and re-reads it into cache. -
remove
void remove(long repositoryId) Removes given repository from cache -
initialiseCache
void initialiseCache()Loads all repositories into cache and enables cache. -
disableCache
void disableCache()Disables cache. -
getCacheStats
BambooCacheStats getCacheStats()Retrieve cache statistics- Returns:
- Cache statistics
- Since:
- 9.5
-