Examples of DependencyGraph


Examples of com.espertech.esper.util.DependencyGraph

                                                   boolean queryPlanLogging,
                                                   Annotation[] annotations)
            throws ExprValidationException
    {
        // Determine if there is a historical stream, and what dependencies exist
        DependencyGraph historicalDependencyGraph = new DependencyGraph(streamTypes.length);
        boolean[] isHistorical = new boolean[streamViews.length];
        boolean hasHistorical = false;
        for (int i = 0; i < streamViews.length; i++)
        {
            if (streamViews[i] instanceof HistoricalEventViewable)
            {
                HistoricalEventViewable historicalViewable = (HistoricalEventViewable) streamViews[i];
                isHistorical[i] = true;
                hasHistorical = true;
                SortedSet<Integer> streamsThisStreamDependsOn = historicalViewable.getRequiredStreams();
                historicalDependencyGraph.addDependency(i, streamsThisStreamDependsOn);
            }
        }

        if (log.isDebugEnabled()) {
            log.debug("Dependency graph: " + historicalDependencyGraph);
View Full Code Here

Examples of com.google.gxp.compiler.depend.DependencyGraph

        : Predicates.<FileRef>in(allowedOutputs);

    compilationSet.compile(alertSink, alertPolicy, outputLanguages, shouldCompileFilePredicate);

    writeDotFiles(compilationSet, alertSink);
    writeCompilationManager(new DependencyGraph(compilationSet));
  }
View Full Code Here

Examples of com.opengamma.engine.depgraph.DependencyGraph

    builder.setResolutionFailureListener(resolutionFailureAccumulator);
    builder.setDisableFailureReporting(false);
    for (final ValueRequirement requirement : properties.getRequirements()) {
      builder.addTarget(requirement);
    }
    DependencyGraph dependencyGraph = builder.getDependencyGraph();
    List<ResolutionFailure> resolutionFailures = resolutionFailureAccumulator.getResolutionFailures();

    DependencyGraphBuildTrace graphBuildTrace = DependencyGraphBuildTrace.of(
        dependencyGraph,
        builder.getExceptions(),
View Full Code Here

Examples of edu.brown.designer.DependencyGraph

     * @throws CycleInDagException
     */
    public static Table[] sortTables() throws CycleInDagException
    {
        CatalogContext cc = new CatalogContext(s_cat.getCatalog());
        DependencyGraph dgraph = DependencyGraphGenerator.generate(cc);

        int size = dgraph.getVertexCount();

        Table[] ret = new Table[size];

        // zero_list: vertices whose in-degree is zero
        List<DesignerVertex> zero_list = new LinkedList<DesignerVertex>();
        List<DesignerVertex> non_zero_list = new LinkedList<DesignerVertex>();

        // initialize two lists
        for (DesignerVertex v : dgraph.getVertices())
        {
            if (dgraph.getPredecessorCount(v) == 0)
            {
                zero_list.add(v);
                // System.out.println("To zero_list: " + v);
            }
            else
            {
                non_zero_list.add(v);
                // System.out.println("To non_zero_list: " + v);
            }
        }

        int cnt = 0;
        while (true)
        {
            if (zero_list.isEmpty() && non_zero_list.isEmpty())
                break;

            if (zero_list.isEmpty())
            {
                throw new CycleInDagException();
            }

            DesignerVertex cur = zero_list.remove(0);
            ret[cnt++] = (Table) (cur.getCatalogItem());

            // System.out.println("Next ver: " + cur);

            Collection<DesignerVertex> successors = dgraph.getSuccessors(cur);
            dgraph.removeVertex(cur);

            for (DesignerVertex successor : successors)
            {
                if (dgraph.getPredecessorCount(successor) == 0)
                {
                    non_zero_list.remove(successor);
                    zero_list.add(successor);
                    // System.out.println("Move " + successor +
                    // " from non_zero to zero");
View Full Code Here

Examples of hudson.model.DependencyGraph

     *      True if any upstream projects are building or in queue, false otherwise.
     */
    @SuppressWarnings("rawtypes")
        private boolean areUpstreamsBuilding(AbstractProject<?,?> downstreamProject,
        AbstractProject<?,?> excludeProject) {
      DependencyGraph graph = Jenkins.getInstance().getDependencyGraph();
      Set<AbstractProject> tups = graph.getTransitiveUpstream(downstreamProject);
      for (AbstractProject tup : tups) {
        if(tup!=excludeProject && (tup.isBuilding() || tup.isInQueue()))
          return true;
      }
      return false;
View Full Code Here

Examples of hudson.model.DependencyGraph

      }
      return false;
    }

    private boolean inDownstreamProjects(AbstractProject<?,?> downstreamProject) {
      DependencyGraph graph = Jenkins.getInstance().getDependencyGraph();
      Set<AbstractProject> tups = graph.getTransitiveUpstream(downstreamProject);
   
      for (AbstractProject tup : tups) {
        List<AbstractProject<?,?>> downstreamProjects = getUpstreamProject().getDownstreamProjects();
        for (AbstractProject<?,?> dp : downstreamProjects) {
          if(dp!=getUpstreamProject() && dp!=downstreamProject && dp==tup)
View Full Code Here

Examples of hudson.model.DependencyGraph

       
        addModuleAsPluginDependency(this.module, pluginModule);
       
        when(this.module.getAllMavenModules()).thenReturn(Lists.newArrayList(this.module, pluginModule));
       
        DependencyGraph graph = MockHelper.mockDependencyGraph(
                Lists.<AbstractProject<?,?>>newArrayList(this.module, pluginModule));
        graph.build();
       
        @SuppressWarnings("rawtypes")
        List<AbstractProject> downstream = graph.getDownstream(pluginModule);
        Assert.assertEquals(1, downstream.size());
        Assert.assertSame(this.module, downstream.get(0));
    }
View Full Code Here

Examples of hudson.model.DependencyGraph

     *      Receives the progress report.
     */
    public static boolean execute(AbstractBuild build, BuildListener listener) {
        PrintStream logger = listener.getLogger();
        // Check all downstream Project of the project, not just those defined by BuildTrigger
        final DependencyGraph graph = Jenkins.getInstance().getDependencyGraph();
        List<Dependency> downstreamProjects = new ArrayList<Dependency>(
                graph.getDownstreamDependencies(build.getProject()));
        // Sort topologically
        Collections.sort(downstreamProjects, new Comparator<Dependency>() {
            public int compare(Dependency lhs, Dependency rhs) {
                // Swapping lhs/rhs to get reverse sort:
                return graph.compare(rhs.getDownstreamProject(), lhs.getDownstreamProject());
            }
        });

        for (Dependency dep : downstreamProjects) {
            AbstractProject p = dep.getDownstreamProject();
View Full Code Here

Examples of hudson.model.DependencyGraph

    /**
     * Rebuilds the dependency map.
     */
    public void rebuildDependencyGraph() {
        DependencyGraph graph = new DependencyGraph();
        graph.build();
        // volatile acts a as a memory barrier here and therefore guarantees
        // that graph is fully build, before it's visible to other threads
        dependencyGraph = graph;
    }
View Full Code Here

Examples of org.apache.flex.compiler.internal.projects.DependencyGraph

            script.setLastModified(cu.getSyntaxTreeRequest().get().getLastModified());
           
            if (definitionsToBuild != null)
                definitionsToBuild.add(def);
        }
        final DependencyGraph dependencyGraph =
            flexProject.getDependencyGraph();
        Set<ICompilationUnit> directDependencies =
            dependencyGraph.getDirectDependencies(cu);
        for (ICompilationUnit directDependency : directDependencies)
        {
            final Map<String, DependencyTypeSet> dependenciesMap =
                dependencyGraph.getDependencySet(cu, directDependency);
            for (Map.Entry<String, DependencyTypeSet> dependencyEntry : dependenciesMap.entrySet())
            {
                for (DependencyType type : dependencyEntry.getValue())
                    script.addDependency(dependencyEntry.getKey(), type);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.