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

public Class PedestrianObjectReachabilityChecker

extends Object
implements ObjectReachabilityChecker
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.revwalk.ObjectReachabilityChecker
Imports
java.io.IOException, .InvalidObjectException, java.util.Collection, .Iterator, .Optional, java.util.stream.Stream, org.eclipse.jgit.errors.MissingObjectException, org.eclipse.jgit.revwalk.ObjectReachabilityChecker, .ObjectWalk, .RevCommit, .RevObject, .RevSort

Checks if all objects are reachable from certain starting points doing a walk.

Field Summary

Modifier and TypeField and Description
private final ObjectWalk

Constructor Summary

AccessConstructor and Description
public
PedestrianObjectReachabilityChecker(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

PedestrianObjectReachabilityCheckerback to summary
public PedestrianObjectReachabilityChecker(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.

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