Class CycleFinder

java.lang.Object
net.sf.jailer.util.CycleFinder

public class CycleFinder extends Object
Finds dependency cycles.
Author:
Ralf Wisser
  • Constructor Details

    • CycleFinder

      public CycleFinder()
  • Method Details

    • findCycle

      public static Collection<CycleFinder.Path> findCycle(DataModel dataModel, Collection<Table> tables, boolean findExact, Long timeout, CycleFinder.CycleConsumer cycleConsumer)
      Finds all dependency cycles in a data model.
      Parameters:
      dataModel - the data model
      tables - the set of tables to search within
      findExact - true to find exact (non-overlapping) cycles
      timeout - optional timeout in milliseconds, or null for no timeout
      cycleConsumer - consumes cycles (optional)
      Returns:
      all cycles found in the data model
    • getCycle

      public static Set<Table> getCycle(Collection<Table> tables)
      Gets set of all tables involved in a cycle.
      Parameters:
      tables - all tables
      Returns:
      subset of tables involved in a cycle