Top Description Fields Constructors Methods
org.eclipse.jgit.internal.revwalk

public Class BitmappedObjectReachabilityChecker

extends Object
implements ObjectReachabilityChecker
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.revwalk.ObjectReachabilityChecker
Imports
java.io.IOException, java.util.ArrayList, .Arrays, .Collection, .Iterator, .List, .Optional, java.util.stream.Stream, org.eclipse.jgit.errors.IncorrectObjectTypeException, .MissingObjectException, org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder, org.eclipse.jgit.revwalk.BitmapWalker, .ObjectReachabilityChecker, .ObjectWalk, .RevObject

Checks if all objects are reachable from certain starting points using bitmaps.

Field Summary

Modifier and TypeField and Description
private final ObjectWalk

Constructor Summary

AccessConstructor and Description
public
BitmappedObjectReachabilityChecker(ObjectWalk
ObjectWalk instance to reuse. Caller retains ownership.
walk
)

New instance of the reachability checker using a existing walk.

Method Summary

Modifier and TypeMethod and Description
public Optional<RevObject>
areAllReachable(Collection<RevObject>
objects to check for reachability from the starters
targets
,
Stream<RevObject>
objects known to be reachable to the caller
starters
)

Implements org.eclipse.jgit.revwalk.ObjectReachabilityChecker.areAllReachable.

Checks that all targets are reachable from the starters.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

walkback to summary
private final ObjectWalk walk

Constructor Detail

BitmappedObjectReachabilityCheckerback to summary
public BitmappedObjectReachabilityChecker(ObjectWalk walk)

New instance of the reachability checker using a existing walk.

Parameters
walk:ObjectWalk

ObjectWalk instance to reuse. Caller retains ownership.

Method Detail

areAllReachableback to summary
public Optional<RevObject> areAllReachable(Collection<RevObject> targets, Stream<RevObject> starters) throws IOException

Implements org.eclipse.jgit.revwalk.ObjectReachabilityChecker.areAllReachable.

Doc from org.eclipse.jgit.revwalk.ObjectReachabilityChecker.areAllReachable.

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.

Parameters
targets:Collection<RevObject>

objects to check for reachability from the starters

starters:Stream<RevObject>

objects known to be reachable to the caller

Returns:Optional<RevObject>

Optional a single unreachable target if there are any (there could be more). Empty optional means all targets are reachable.

Annotations
@Override
Exceptions
IOException:
Cannot access underlying storage