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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
disableCache()
Disables cache.Stream<VcsRepositoryData>
findRepositoriesByPluginKey(String pluginKey)
Returns all repositories with the given plugin keyBambooCacheStats
getCacheStats()
Retrieve cache statisticsList<VcsRepositoryData>
getProjectAndLinkedRepositories()
Get 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
initialiseCache()
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 cache-
Methods inherited from interface com.atlassian.bamboo.repository.CachedRepositoryDefinitionAccessor
findAllTopLevelRepositoriesIds, findLinkedRepositoryByName, findProjectRepositoryByName, findRepositoriesByProjectId, getAllTopLevelRepositories, getLinkedRepositories, getLinkedRepositoriesForAdministration, getVcsRepositoriesDataWithConsistencyGuarantee, getVcsRepositoryData, getVcsRepositoryDataWithConsistencyGuarantee
-
-
-
-
Method Detail
-
findRepositoriesByPluginKey
Stream<VcsRepositoryData> findRepositoriesByPluginKey(String pluginKey)
Returns all repositories with the given plugin key
-
getProjectRepositories
@NotNull @NotNull Stream<VcsRepositoryData> getProjectRepositories(long projectId)
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
-
-