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
RevFilter
may 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) boolean
canDispose
private RevFilter
filter
private static RevCommit
INIT_LAST
A commit near the end of time, to initializelast
with.private RevCommit
last
Last commit produced to the caller fromnext()
.private int
output
(package private) static int
OVER_SCAN
Number of additional commits to scan after we think we are done.private int
overScan
Number of commits we have remaining in our over-scan allotment.private static int
PARSED
private DateRevQueue
pending
private static int
SEEN
private static int
UNINTERESTING
private RevWalk
walker
-
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) RevCommit
next()
Return the next commit to the application, or the next generator.(package private) int
outputType()
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 initializelast
with.
-
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
UNINTERESTING
commits in thepending
queue.
-
canDispose
boolean canDispose
-
-
Constructor Detail
-
PendingGenerator
PendingGenerator(RevWalk w, DateRevQueue p, RevFilter f, int out)
-
-
Method Detail
-
outputType
int outputType()
Description copied from class:Generator
Obtain flags describing the output behavior of this generator.- Specified by:
outputType
in 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:Generator
Return the next commit to the application, or the next generator.- Specified by:
next
in classGenerator
- Returns:
- next available commit; null if no more are to be returned.
- Throws:
MissingObjectException
IncorrectObjectTypeException
java.io.IOException
-
-