Class BitmappedObjectReachabilityChecker
java.lang.Object
org.eclipse.jgit.internal.revwalk.BitmappedObjectReachabilityChecker
- All Implemented Interfaces:
ObjectReachabilityChecker
Checks if all objects are reachable from certain starting points using
bitmaps.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNew instance of the reachability checker using a existing walk. -
Method Summary
Modifier and TypeMethodDescriptionareAllReachable
(Collection<RevObject> targets, Stream<RevObject> starters) Checks that all targets are reachable from the starters.
-
Field Details
-
walk
-
-
Constructor Details
-
BitmappedObjectReachabilityChecker
New instance of the reachability checker using a existing walk.- Parameters:
walk
- ObjectWalk instance to reuse. Caller retains ownership.
-
-
Method Details
-
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 interfaceObjectReachabilityChecker
- Parameters:
targets
- objects to check for reachability from the startersstarters
- objects known to be reachable to the caller- Returns:
- Optional a single unreachable target if there are any (there could be more). Empty optional means all targets are reachable.
- Throws:
IOException
- Cannot access underlying storage
-