Beispiel #1
0
 private Cycle<Requirement<Project>> cycleFromOutgoingRequirements(
     StatusInstant<Project> statusInstant) {
   for (Requirement<Project> blocker :
       finder.getRequirements(getPrerequisite(requirement), statusInstant.getGraph())) {
     RequirementNode<Project> prerequisite = getPrerequisite(blocker);
     if (prerequisite != null && !prerequisite.intrinsicallyInactionable(statusInstant)) {
       Cycle<Requirement<Project>> cycle =
           new DescendantAncestry(now, blocker, finder, this).findCycle(statusInstant);
       if (cycle != null) return cycle;
     }
   }
   return null;
 }
Beispiel #2
0
 public Cycle<Requirement<Project>> findCycle(StatusInstant<Project> statusInstant) {
   Map<Object, Cycle<Requirement<Project>>> cycleCache = statusInstant.getCycleCache();
   if (!cycleCache.containsKey(requirement))
     cycleCache.put(requirement, computeCycle(statusInstant));
   return cycleCache.get(requirement);
 }
Beispiel #3
0
 public void harden(Project project, StatusInstant<Project> instant) {
   project.harden(findCycle(instant) != null, now, instant.getGraph());
 }