Class DependencyGraphUpdater<T>


  • public class DependencyGraphUpdater<T>
    extends Object
    This class's responsibility is to maintain the state of its graph when notified that a new model resource or a new dependency have been found.
    • Constructor Detail

      • DependencyGraphUpdater

        public DependencyGraphUpdater​(IGraph<T> graph,
                                      com.google.common.eventbus.EventBus eventBus)
        Constructor.
        Parameters:
        graph - The graph, must not be null.
        eventBus - The event bus that will fire events to record.
    • Method Detail

      • recordNode

        public void recordNode​(ResolvedEvent<T> event)
        Register a discovered resource in the graph.
        Parameters:
        event - Event that describes the discovered resource.
      • recordEdge

        public void recordEdge​(DependencyFoundEvent<T> event)
        Register a dependency in the graph.
        Parameters:
        event - Event that describes the dependency.
      • recordRemoval

        public void recordRemoval​(ResourceRemovedEvent<T> event)
        Register removal of nodes.
        Parameters:
        event - The event indicating the removed nodes.