Package com.google.gerrit.server.submit
Class SubscriptionGraph
- java.lang.Object
- 
- com.google.gerrit.server.submit.SubscriptionGraph
 
- 
 public class SubscriptionGraph extends Object 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 Classes Modifier and Type Class Description static classSubscriptionGraph.DefaultFactorystatic interfaceSubscriptionGraph.Factorystatic classSubscriptionGraph.Module
 - 
Constructor SummaryConstructors Constructor Description 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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description com.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>getAffectedSuperProjects()Get all superprojects affected.com.google.common.collect.ImmutableSet<BranchNameKey>getSortedSuperprojectAndSubmoduleBranches()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>getUpdatedBranches()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 Detail- 
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 Detail- 
getUpdatedBranchespublic com.google.common.collect.ImmutableSet<BranchNameKey> getUpdatedBranches() Get branches updated as part of the enclosing submit or push batch.
 - 
getAffectedSuperProjectspublic com.google.common.collect.ImmutableSet<Project.NameKey> getAffectedSuperProjects() Get 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:
- sortedBranches
 
 - 
hasSuperprojectpublic boolean hasSuperproject(BranchNameKey branch) Check if abranchis a submodule of a superproject.
 - 
hasSubscriptionpublic boolean hasSubscription(BranchNameKey branch) See if abranchis a superproject branch affected.
 - 
getSubscriptionspublic com.google.common.collect.ImmutableSet<SubmoduleSubscription> getSubscriptions(BranchNameKey branch) Get all relatedSubmoduleSubscriptions whose super branch isbranch.
 
- 
 
-