Top Description Methods
org.eclipse.jgit.revwalk

public Interface ObjectReachabilityChecker

Known Direct Implementers
org.eclipse.jgit.internal.revwalk.BitmappedObjectReachabilityChecker, org.eclipse.jgit.internal.revwalk.PedestrianObjectReachabilityChecker
Imports
java.io.IOException, java.util.Collection, .Optional, java.util.stream.Stream

Checks if all objects are reachable from certain starting points. This is an expensive check that browses commits, trees, blobs and tags. For reachability just between commits see ReachabilityChecker implementations.
Since
5.8

Method Summary

Modifier and TypeMethod and Description
public Optional<RevObject>

Returns:

Optional a single unreachable target if there are any (there could be more). Empty optional means all targets are reachable.
areAllReachable
(Collection<RevObject>
objects to check for reachability from the starters
targets
,
Stream<RevObject>
objects known to be reachable to the caller
starters
)

Checks that all targets are reachable from the starters.

Method Detail

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

Checks that all targets are reachable from the starters.

Implementation Specification

Missing or invalid objects are reported as illegal state. Caller should have found them while translating ObjectIds into RevObjects. They can only happen here if the caller is mixing revwalks.

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.

Exceptions
IOException:
Cannot access underlying storage