Package com.google.gerrit.server.submit
Class SubscriptionGraph
java.lang.Object
com.google.gerrit.server.submit.SubscriptionGraph
A container which stores subscription relationship. A SubscriptionGraph is calculated every time
 changes are pushed. Some branches are updated in these changes, and if these branches are
 subscribed by other projects, SubscriptionGraph would record information about these updated
 branches and branches/projects affected.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic class
- 
Constructor SummaryConstructorsConstructorDescriptionSubscriptionGraph(Set<BranchNameKey> updatedBranches, com.google.common.collect.SetMultimap<BranchNameKey, SubmoduleSubscription> targets, com.google.common.collect.SetMultimap<Project.NameKey, BranchNameKey> branchesByProject, Set<BranchNameKey> subscribedBranches, Set<BranchNameKey> sortedBranches) 
- 
Method SummaryModifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<BranchNameKey> getAffectedSuperBranches(Project.NameKey project) Returns all branches within the superprojectprojectwhich have submodule subscriptions.com.google.common.collect.ImmutableSet<Project.NameKey> Get all superprojects affected.com.google.common.collect.ImmutableSet<BranchNameKey> Get all affected branches, including the submodule branches and superproject branches, sorted by traversal order.com.google.common.collect.ImmutableSet<SubmoduleSubscription> getSubscriptions(BranchNameKey branch) Get all relatedSubmoduleSubscriptions whose super branch isbranch.com.google.common.collect.ImmutableSet<BranchNameKey> Get branches updated as part of the enclosing submit or push batch.booleanhasSubscription(BranchNameKey branch) See if abranchis a superproject branch affected.booleanhasSuperproject(BranchNameKey branch) Check if abranchis a submodule of a superproject.
- 
Constructor Details- 
SubscriptionGraphpublic SubscriptionGraph(Set<BranchNameKey> updatedBranches, com.google.common.collect.SetMultimap<BranchNameKey, SubmoduleSubscription> targets, com.google.common.collect.SetMultimap<Project.NameKey, BranchNameKey> branchesByProject, Set<BranchNameKey> subscribedBranches, Set<BranchNameKey> sortedBranches) 
 
- 
- 
Method Details- 
getUpdatedBranchesGet branches updated as part of the enclosing submit or push batch.
- 
getAffectedSuperProjectsGet all superprojects affected.
- 
getAffectedSuperBranchespublic com.google.common.collect.ImmutableSet<BranchNameKey> getAffectedSuperBranches(Project.NameKey project) Returns all branches within the superprojectprojectwhich have submodule subscriptions.
- 
getSortedSuperprojectAndSubmoduleBranchespublic com.google.common.collect.ImmutableSet<BranchNameKey> getSortedSuperprojectAndSubmoduleBranches()Get all affected branches, including the submodule branches and superproject branches, sorted by traversal order.- See Also:
 
- 
hasSuperprojectCheck if abranchis a submodule of a superproject.
- 
hasSubscriptionSee if abranchis a superproject branch affected.
- 
getSubscriptionspublic com.google.common.collect.ImmutableSet<SubmoduleSubscription> getSubscriptions(BranchNameKey branch) Get all relatedSubmoduleSubscriptions whose super branch isbranch.
 
-