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

pack-priv Class PendingGenerator

extends Generator
Class Inheritance
Imports
java.io.IOException, org.eclipse.jgit.errors.IncorrectObjectTypeException, .MissingObjectException, .StopWalkException, org.eclipse.jgit.lib.ObjectId, org.eclipse.jgit.revwalk.filter.RevFilter

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

Modifier and TypeField and Description
pack-priv boolean
private final RevFilter
private static final RevCommit
INIT_LAST

A commit near the end of time, to initialize last with.

private RevCommit
last

Last commit produced to the caller from next().

private final int
pack-priv static final 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 final int
private final DateRevQueue
private static final int
private static final int
private final RevWalk
Inherited from org.eclipse.jgit.revwalk.Generator:
firstParentHAS_REWRITEHAS_UNINTERESTINGNEEDS_REWRITESORT_COMMIT_TIME_DESCSORT_TOPO

Constructor Summary

AccessConstructor and Description
pack-priv
PendingGenerator(final RevWalk w, final DateRevQueue p, final RevFilter f, final int out)

Method Summary

Modifier and TypeMethod and Description
pack-priv RevCommit
next()

Implements abstract org.eclipse.jgit.revwalk.Generator.next.

Return the next commit to the application, or the next generator.

pack-priv int
outputType()

Implements abstract org.eclipse.jgit.revwalk.Generator.outputType.

Obtain flags describing the output behavior of this generator.

Inherited from org.eclipse.jgit.revwalk.Generator:
shareFreeList

Field Detail

canDisposeback to summary
pack-priv boolean canDispose
filterback to summary
private final RevFilter filter
INIT_LASTback to summary
private static final RevCommit INIT_LAST

A commit near the end of time, to initialize last with.

lastback to summary
private RevCommit last

Last commit produced to the caller from next().

outputback to summary
private final int output
OVER_SCANback to summary
pack-priv 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.

overScanback to summary
private int overScan

Number of commits we have remaining in our over-scan allotment.

Only relevant if there are UNINTERESTING commits in the pending queue.

PARSEDback to summary
private static final int PARSED
pendingback to summary
private final DateRevQueue pending
SEENback to summary
private static final int SEEN
UNINTERESTINGback to summary
private static final int UNINTERESTING
walkerback to summary
private final RevWalk walker

Constructor Detail

PendingGeneratorback to summary
pack-priv PendingGenerator(final RevWalk w, final DateRevQueue p, final RevFilter f, final int out)

Method Detail

nextback to summary
pack-priv RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException

Implements abstract org.eclipse.jgit.revwalk.Generator.next.

Doc from org.eclipse.jgit.revwalk.Generator.next.

Return the next commit to the application, or the next generator.

Returns:RevCommit

next available commit; null if no more are to be returned.

Annotations
@Override
Exceptions
MissingObjectException:
if an object is missing
IncorrectObjectTypeException:
if an object has an unexpected type
IOException:
if an IO error occurred
outputTypeback to summary
pack-priv int outputType()

Implements abstract org.eclipse.jgit.revwalk.Generator.outputType.

Doc from org.eclipse.jgit.revwalk.Generator.outputType.

Obtain flags describing the output behavior of this generator.

Returns:int

one or more of the constants declared in this class, describing how this generator produces its results.

Annotations
@Override