Package org.eclipse.jgit.revwalk
Class PendingGenerator
- java.lang.Object
-
- org.eclipse.jgit.revwalk.Generator
-
- org.eclipse.jgit.revwalk.PendingGenerator
-
class PendingGenerator extends Generator
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
RevFiltermay be used to select a subset of the commits and return them to the caller.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleancanDisposeprivate RevFilterfilterprivate static RevCommitINIT_LASTA commit near the end of time, to initializelastwith.private RevCommitlastLast commit produced to the caller fromnext().private intoutput(package private) static intOVER_SCANNumber of additional commits to scan after we think we are done.private intoverScanNumber of commits we have remaining in our over-scan allotment.private static intPARSEDprivate DateRevQueuependingprivate static intSEENprivate static intUNINTERESTINGprivate RevWalkwalker-
Fields inherited from class org.eclipse.jgit.revwalk.Generator
firstParent, HAS_REWRITE, HAS_UNINTERESTING, NEEDS_REWRITE, SORT_COMMIT_TIME_DESC, SORT_TOPO
-
-
Constructor Summary
Constructors Constructor Description PendingGenerator(RevWalk w, DateRevQueue p, RevFilter f, int out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) RevCommitnext()Return the next commit to the application, or the next generator.(package private) intoutputType()Obtain flags describing the output behavior of this generator.-
Methods inherited from class org.eclipse.jgit.revwalk.Generator
shareFreeList
-
-
-
-
Field Detail
-
PARSED
private static final int PARSED
- See Also:
- Constant Field Values
-
SEEN
private static final int SEEN
- See Also:
- Constant Field Values
-
UNINTERESTING
private static final int UNINTERESTING
- See Also:
- Constant Field Values
-
OVER_SCAN
static final int OVER_SCAN
Number 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:
- Constant Field Values
-
INIT_LAST
private static final RevCommit INIT_LAST
A commit near the end of time, to initializelastwith.
-
walker
private final RevWalk walker
-
pending
private final DateRevQueue pending
-
filter
private final RevFilter filter
-
output
private final int output
-
overScan
private int overScan
Number of commits we have remaining in our over-scan allotment.Only relevant if there are
UNINTERESTINGcommits in thependingqueue.
-
canDispose
boolean canDispose
-
-
Constructor Detail
-
PendingGenerator
PendingGenerator(RevWalk w, DateRevQueue p, RevFilter f, int out)
-
-
Method Detail
-
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
RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
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:
MissingObjectExceptionIncorrectObjectTypeExceptionjava.io.IOException
-
-