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

pack-priv Class TopoSortGenerator

extends Generator
Class Inheritance
Imports
java.io.IOException, org.eclipse.jgit.errors.IncorrectObjectTypeException, .MissingObjectException

Sorts commits in topological order.

Field Summary

Modifier and TypeField and Description
private final int
private final FIFORevQueue
private static final int
Inherited from org.eclipse.jgit.revwalk.Generator:
firstParentHAS_REWRITEHAS_UNINTERESTINGNEEDS_REWRITESORT_COMMIT_TIME_DESCSORT_TOPO

Constructor Summary

AccessConstructor and Description
pack-priv
TopoSortGenerator(Generator
generator to pull all commits out of, and into this buffer.
s
)

Create a new sorter and completely spin the generator.

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.

pack-priv void
shareFreeList(BlockRevQueue
another FIFO queue that wants to share our queue's free list.
q
)

Overrides org.eclipse.jgit.revwalk.Generator.shareFreeList.

Connect the supplied queue to this generator's own free list (if any).

Field Detail

outputTypeback to summary
private final int outputType
pendingback to summary
private final FIFORevQueue pending
TOPO_DELAYback to summary
private static final int TOPO_DELAY

Constructor Detail

TopoSortGeneratorback to summary
pack-priv 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

generator to pull all commits out of, and into this buffer.

Exceptions
MissingObjectException:
if an object is missing
IncorrectObjectTypeException:
if an object has an unexpected type
IOException:
if an IO error occurred

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
shareFreeListback to summary
pack-priv void shareFreeList(BlockRevQueue q)

Overrides org.eclipse.jgit.revwalk.Generator.shareFreeList.

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

Connect the supplied queue to this generator's own free list (if any).

Parameters
q:BlockRevQueue

another FIFO queue that wants to share our queue's free list.

Annotations
@Override