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; }
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); }
public void harden(Project project, StatusInstant<Project> instant) { project.harden(findCycle(instant) != null, now, instant.getGraph()); }