public class PackBitmapIndexBuilder extends PackBitmapIndex
PackBitmapIndexes.| Modifier and Type | Class and Description |
|---|---|
static class |
PackBitmapIndexBuilder.StoredEntry
Data object for the on disk representation of a bitmap entry.
|
FLAG_REUSE| Constructor and Description |
|---|
PackBitmapIndexBuilder(List<ObjectToPack> byName)
Creates a PackBitmapIndex used for building the contents of an index
file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBitmap(AnyObjectId objectId,
BitmapIndex.Bitmap bitmap,
int flags)
Stores the bitmap for the objectId.
|
void |
addBitmap(AnyObjectId objectId,
com.googlecode.javaewah.EWAHCompressedBitmap bitmap,
int flags)
Stores the bitmap for the objectId.
|
void |
clearBitmaps()
Removes all the bitmaps entries added.
|
int |
findPosition(AnyObjectId objectId)
Finds the position in the bitmap of the object.
|
com.googlecode.javaewah.EWAHCompressedBitmap |
getBitmap(AnyObjectId objectId)
Returns the previously constructed bitmap for the object.
|
int |
getBitmapCount() |
com.googlecode.javaewah.EWAHCompressedBitmap |
getBlobs() |
com.googlecode.javaewah.EWAHCompressedBitmap |
getCommits() |
Iterable<PackBitmapIndexBuilder.StoredEntry> |
getCompressedBitmaps() |
ObjectId |
getObject(int position)
Get the object at the bitmap position.
|
int |
getObjectCount()
Obtain the total number of objects described by this index.
|
int |
getOptions() |
com.googlecode.javaewah.EWAHCompressedBitmap |
getTags() |
com.googlecode.javaewah.EWAHCompressedBitmap |
getTrees() |
com.googlecode.javaewah.EWAHCompressedBitmap |
ofObjectType(com.googlecode.javaewah.EWAHCompressedBitmap bitmap,
int type)
Returns a bitmap containing positions for objects that have the given Git
type.
|
open, readpublic PackBitmapIndexBuilder(List<ObjectToPack> byName)
byName - objects sorted by name.public void addBitmap(AnyObjectId objectId, BitmapIndex.Bitmap bitmap, int flags)
objectId - the object id key for the bitmap.bitmap - the bitmapflags - the flags to be stored with the bitmappublic void addBitmap(AnyObjectId objectId, com.googlecode.javaewah.EWAHCompressedBitmap bitmap, int flags)
objectId - the object id key for the bitmap.bitmap - the bitmapflags - the flags to be stored with the bitmappublic com.googlecode.javaewah.EWAHCompressedBitmap ofObjectType(com.googlecode.javaewah.EWAHCompressedBitmap bitmap,
int type)
PackBitmapIndexofObjectType in class PackBitmapIndexbitmap - the object bitmap.type - the Git type.public int findPosition(AnyObjectId objectId)
PackBitmapIndexfindPosition in class PackBitmapIndexobjectId - the id for which the bitmap position will be found.public ObjectId getObject(int position) throws IllegalArgumentException
PackBitmapIndexgetObject in class PackBitmapIndexposition - the id for which the object will be found.IllegalArgumentException - when the item is not found.public com.googlecode.javaewah.EWAHCompressedBitmap getCommits()
public com.googlecode.javaewah.EWAHCompressedBitmap getTrees()
public com.googlecode.javaewah.EWAHCompressedBitmap getBlobs()
public com.googlecode.javaewah.EWAHCompressedBitmap getTags()
public int getOptions()
public int getBitmapCount()
public void clearBitmaps()
public int getObjectCount()
PackBitmapIndexgetObjectCount() - 1 is the largest bit that will be set in a
bitmap.getObjectCount in class PackBitmapIndexpublic Iterable<PackBitmapIndexBuilder.StoredEntry> getCompressedBitmaps()
public com.googlecode.javaewah.EWAHCompressedBitmap getBitmap(AnyObjectId objectId)
PackBitmapIndexgetBitmap in class PackBitmapIndexobjectId - the id for which the bitmap will be found.Copyright © 2014. All rights reserved.