Class BitmappedObjectReachabilityChecker

    • Constructor Detail

      • BitmappedObjectReachabilityChecker

        public BitmappedObjectReachabilityChecker​(ObjectWalk walk)
        New instance of the reachability checker using a existing walk.
        walk - ObjectWalk instance to reuse. Caller retains ownership.
    • Method Detail

      • areAllReachable

        public Optional<RevObject> areAllReachable​(Collection<RevObject> targets,
                                                   Stream<RevObject> starters)
                                            throws IOException
        Checks that all targets are reachable from the starters. This implementation tries to shortcut the check adding starters incrementally. Ordering the starters by relevance can improve performance in the average case.
        Specified by:
        areAllReachable in interface ObjectReachabilityChecker
        targets - objects to check for reachability from the starters
        starters - objects known to be reachable to the caller
        Optional a single unreachable target if there are any (there could be more). Empty optional means all targets are reachable.
        IOException - Cannot access underlying storage