Class PackWriter.DepthAwareVisitationPolicy
java.lang.Object
org.eclipse.jgit.internal.storage.pack.PackWriter.DepthAwareVisitationPolicy
- All Implemented Interfaces:
ObjectWalk.VisitationPolicy
- Enclosing class:
- PackWriter
private static class PackWriter.DepthAwareVisitationPolicy
extends Object
implements ObjectWalk.VisitationPolicy
A visitation policy which uses the depth at which the object is seen to
decide if re-traversal is necessary. In particular, if the object has
already been visited at this depth or shallower, it is not necessary to
re-visit at this depth.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhenever the rev or object walk reaches a Git object, if that object already exists as a RevObject, this method is called to determine if that object should be visited.voidCalled when an object is visited.
-
Field Details
-
lowestDepthVisited
-
walk
-
-
Constructor Details
-
DepthAwareVisitationPolicy
DepthAwareVisitationPolicy(ObjectWalk walk)
-
-
Method Details
-
shouldVisit
Description copied from interface:ObjectWalk.VisitationPolicyWhenever the rev or object walk reaches a Git object, if that object already exists as a RevObject, this method is called to determine if that object should be visited.- Specified by:
shouldVisitin interfaceObjectWalk.VisitationPolicy- Parameters:
o- the object to check if it should be visited- Returns:
- true if the object should be visited
-
visited
Description copied from interface:ObjectWalk.VisitationPolicyCalled when an object is visited.- Specified by:
visitedin interfaceObjectWalk.VisitationPolicy- Parameters:
o- the object that was visited
-