public class GitLabProjectBranchesService extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
GitLabProjectBranchesService.BranchListEntry |
static class |
GitLabProjectBranchesService.TimeUtility |
| Modifier and Type | Field and Description |
|---|---|
protected static long |
BRANCH_CACHE_TIME_IN_MILLISECONDS
length of time a git project's branch list is kept in the
projectBranchCache for a particular source Repository
|
protected static long |
PROJECT_MAP_CACHE_TIME_IN_MILLISECONDS
length of time the list of git project is kept without being refreshed
the map is also refreshed when a key hasnt been found, so we can leave
the cache time high e.g. 1 day:
|
| Modifier | Constructor and Description |
|---|---|
protected |
GitLabProjectBranchesService(GitLabProjectBranchesService.TimeUtility timeUtility) |
| Modifier and Type | Method and Description |
|---|---|
org.gitlab.api.models.GitlabProject |
findGitlabProjectForRepositoryUrl(GitLab gitLab,
String sourceRepositoryString) |
List<String> |
getBranches(GitLab gitLab,
String sourceRepositoryString) |
static GitLabProjectBranchesService |
instance() |
Map<String,org.gitlab.api.models.GitlabProject> |
refreshGitLabProjectMap(GitLab gitLab) |
protected static final long BRANCH_CACHE_TIME_IN_MILLISECONDS
protected static final long PROJECT_MAP_CACHE_TIME_IN_MILLISECONDS
protected GitLabProjectBranchesService(GitLabProjectBranchesService.TimeUtility timeUtility)
public static GitLabProjectBranchesService instance()
public List<String> getBranches(GitLab gitLab, String sourceRepositoryString) throws IOException
IOExceptionpublic org.gitlab.api.models.GitlabProject findGitlabProjectForRepositoryUrl(GitLab gitLab, String sourceRepositoryString) throws IOException
IOExceptionpublic Map<String,org.gitlab.api.models.GitlabProject> refreshGitLabProjectMap(GitLab gitLab) throws IOException
IOExceptionCopyright © 2016. All rights reserved.