Package org.eclipse.jgit.revwalk
Class PendingGenerator
java.lang.Object
org.eclipse.jgit.revwalk.Generator
org.eclipse.jgit.revwalk.PendingGenerator
Default (and first pass) RevCommit Generator implementation for RevWalk.
This generator starts from a set of one or more commits and process them in
descending (newest to oldest) commit time order. Commits automatically cause
their parents to be enqueued for further processing, allowing the entire
commit graph to be walked. A RevFilter may be used to select a subset
of the commits and return them to the caller.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanprivate final RevFilterprivate static final RevCommitA commit near the end of time, to initializelastwith.private RevCommitLast commit produced to the caller fromnext().private final int(package private) static final intNumber of additional commits to scan after we think we are done.private intNumber of commits we have remaining in our over-scan allotment.private static final intprivate final DateRevQueueprivate static final intprivate static final intprivate final RevWalkFields inherited from class org.eclipse.jgit.revwalk.Generator
firstParent, HAS_REWRITE, HAS_UNINTERESTING, NEEDS_REWRITE, SORT_COMMIT_TIME_DESC, SORT_TOPO -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.eclipse.jgit.revwalk.Generator
shareFreeList
-
Field Details
-
PARSED
private static final int PARSED- See Also:
-
SEEN
private static final int SEEN- See Also:
-
UNINTERESTING
private static final int UNINTERESTING- See Also:
-
OVER_SCAN
static final int OVER_SCANNumber of additional commits to scan after we think we are done.This small buffer of commits is scanned to ensure we didn't miss anything as a result of clock skew when the commits were made. We need to set our constant to 1 additional commit due to the use of a pre-increment operator when accessing the value.
- See Also:
-
INIT_LAST
A commit near the end of time, to initializelastwith. -
walker
-
pending
-
filter
-
output
private final int output -
last
Last commit produced to the caller fromnext(). -
overScan
private int overScanNumber of commits we have remaining in our over-scan allotment.Only relevant if there are
UNINTERESTINGcommits in thependingqueue. -
canDispose
boolean canDispose
-
-
Constructor Details
-
PendingGenerator
PendingGenerator(RevWalk w, DateRevQueue p, RevFilter f, int out)
-
-
Method Details
-
outputType
int outputType()Description copied from class:GeneratorObtain flags describing the output behavior of this generator.- Specified by:
outputTypein classGenerator- Returns:
- one or more of the constants declared in this class, describing how this generator produces its results.
-
next
Description copied from class:GeneratorReturn the next commit to the application, or the next generator.- Specified by:
nextin classGenerator- Returns:
- next available commit; null if no more are to be returned.
- Throws:
MissingObjectExceptionIncorrectObjectTypeExceptionIOException
-