Class HierarchyManagerImpl.CycleDetector

  • Enclosing class:
    HierarchyManagerImpl

    protected static class HierarchyManagerImpl.CycleDetector
    extends Object
    Utility class used to detect path cycles with as little overhead as possible. The checkCycle(ItemId) method is called for each path element as the HierarchyManagerImpl.buildPath(PathBuilder, ItemState, CycleDetector) method walks up the hierarchy. At first, during the first fifteen path elements, the detector does nothing in order to avoid introducing any unnecessary overhead to normal paths that seldom are deeper than that. After that initial threshold all item identifiers along the path are tracked, and a cycle is reported if an identifier is encountered that already occurred along the same path.
    • Constructor Detail

      • CycleDetector

        protected CycleDetector()