Package org.eclipse.jgit.revwalk
Class TopoSortGenerator
java.lang.Object
org.eclipse.jgit.revwalk.Generator
org.eclipse.jgit.revwalk.TopoSortGenerator
Sorts commits in topological order.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final FIFORevQueueprivate static final intFields inherited from class org.eclipse.jgit.revwalk.Generator
firstParent, HAS_REWRITE, HAS_UNINTERESTING, NEEDS_REWRITE, SORT_COMMIT_TIME_DESC, SORT_TOPO -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new sorter and completely spin the generator. -
Method Summary
Modifier and TypeMethodDescription(package private) RevCommitnext()Return the next commit to the application, or the next generator.(package private) intObtain flags describing the output behavior of this generator.(package private) voidConnect the supplied queue to this generator's own free list (if any).
-
Field Details
-
TOPO_DELAY
private static final int TOPO_DELAY- See Also:
-
pending
-
outputType
private final int outputType
-
-
Constructor Details
-
TopoSortGenerator
TopoSortGenerator(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException Create a new sorter and completely spin the generator.When the constructor completes the supplied generator will have no commits remaining, as all of the commits will be held inside of this generator's internal buffer.
- Parameters:
s- generator to pull all commits out of, and into this buffer.- Throws:
MissingObjectExceptionIncorrectObjectTypeExceptionIOException
-
-
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
-