public final class BitmapWalker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
BitmapWalker.BitmapObjectFilter
Filter that excludes objects already in the given bitmap.
|
Modifier and Type | Field and Description |
---|---|
private BitmapIndex |
bitmapIndex |
private long |
countOfBitmapIndexMisses |
private ProgressMonitor |
pm |
private ObjectWalk |
walker |
Constructor and Description |
---|
BitmapWalker(ObjectWalk walker,
BitmapIndex bitmapIndex,
ProgressMonitor pm)
Create a BitmapWalker.
|
Modifier and Type | Method and Description |
---|---|
BitmapIndex.BitmapBuilder |
findObjects(java.lang.Iterable<? extends ObjectId> start,
BitmapIndex.BitmapBuilder seen,
boolean ignoreMissing)
Return, as a bitmap, the objects reachable from the objects in start.
|
private BitmapIndex.BitmapBuilder |
findObjectsWalk(java.lang.Iterable<? extends ObjectId> start,
BitmapIndex.BitmapBuilder seen,
boolean ignoreMissingStart) |
long |
getCountOfBitmapIndexMisses()
Return the number of objects that had to be walked because they were not covered by a
bitmap.
|
private final ObjectWalk walker
private final BitmapIndex bitmapIndex
private final ProgressMonitor pm
private long countOfBitmapIndexMisses
public BitmapWalker(ObjectWalk walker, BitmapIndex bitmapIndex, ProgressMonitor pm)
walker
- walker to use when traversing the object graph.bitmapIndex
- index to obtain bitmaps from.pm
- progress monitor to report progress on.public long getCountOfBitmapIndexMisses()
public BitmapIndex.BitmapBuilder findObjects(java.lang.Iterable<? extends ObjectId> start, BitmapIndex.BitmapBuilder seen, boolean ignoreMissing) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
start
- the objects to start the object traversal from.seen
- the objects to skip if encountered during traversal.ignoreMissing
- true to ignore missing objects, false otherwise.MissingObjectException
- the object supplied is not available from the object
database. This usually indicates the supplied object is
invalid, but the reference was constructed during an earlier
invocation to
RevWalk.lookupAny(AnyObjectId, int)
.IncorrectObjectTypeException
- the object was not parsed yet and it was discovered during
parsing that it is not actually the type of the instance
passed in. This usually indicates the caller used the wrong
type in a
RevWalk.lookupAny(AnyObjectId, int)
call.java.io.IOException
- a pack file or loose object could not be read.private BitmapIndex.BitmapBuilder findObjectsWalk(java.lang.Iterable<? extends ObjectId> start, BitmapIndex.BitmapBuilder seen, boolean ignoreMissingStart) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
MissingObjectException
IncorrectObjectTypeException
java.io.IOException