public class PackBitmapIndexBuilder extends PackBitmapIndex
PackBitmapIndex
es.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> objects)
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()
Remove 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()
Returns the number of bitmaps in this bitmap index.
|
com.googlecode.javaewah.EWAHCompressedBitmap |
getBlobs()
Get the blob object bitmap.
|
com.googlecode.javaewah.EWAHCompressedBitmap |
getCommits()
Get the commit object bitmap.
|
Iterable<PackBitmapIndexBuilder.StoredEntry> |
getCompressedBitmaps()
Get an iterator over the xor compressed entries.
|
ObjectId |
getObject(int position)
Get the object at the bitmap position.
|
int |
getObjectCount()
Obtain the total number of objects described by this index.
|
ObjectIdOwnerMap<ObjectIdOwnerMap.Entry> |
getObjectSet()
Get set of objects included in the pack.
|
int |
getOptions()
Get the index storage options.
|
com.googlecode.javaewah.EWAHCompressedBitmap |
getTags()
Get the tag object bitmap.
|
com.googlecode.javaewah.EWAHCompressedBitmap |
getTrees()
Get the tree object bitmap.
|
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, read
public PackBitmapIndexBuilder(List<ObjectToPack> objects)
objects
- objects sorted by name. The list must be initially sorted by
ObjectId (name); it will be resorted in place.public ObjectIdOwnerMap<ObjectIdOwnerMap.Entry> getObjectSet()
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)
ofObjectType
in class PackBitmapIndex
bitmap
- the object bitmap.type
- the Git type.public int findPosition(AnyObjectId objectId)
findPosition
in class PackBitmapIndex
objectId
- the id for which the bitmap position will be found.public ObjectId getObject(int position) throws IllegalArgumentException
getObject
in class PackBitmapIndex
position
- 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()
getBitmapCount
in class PackBitmapIndex
public void clearBitmaps()
public int getObjectCount()
getObjectCount() - 1
is the largest bit that will be set in a
bitmap.getObjectCount
in class PackBitmapIndex
public Iterable<PackBitmapIndexBuilder.StoredEntry> getCompressedBitmaps()
public com.googlecode.javaewah.EWAHCompressedBitmap getBitmap(AnyObjectId objectId)
getBitmap
in class PackBitmapIndex
objectId
- the id for which the bitmap will be found.Copyright © 2019 Eclipse JGit Project. All rights reserved.