Class PackBitmapIndexV1
java.lang.Object
org.eclipse.jgit.internal.storage.file.PackBitmapIndex
org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex
org.eclipse.jgit.internal.storage.file.PackBitmapIndexV1
Support for the pack bitmap index v1 format.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classTemporary holder of object position in pack index and other metadata forStoredBitmap.Nested classes/interfaces inherited from class org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex
BasePackBitmapIndex.StoredBitmapNested classes/interfaces inherited from class org.eclipse.jgit.internal.storage.file.PackBitmapIndex
PackBitmapIndex.SupplierWithIOException<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectIdOwnerMap<BasePackBitmapIndex.StoredBitmap>private final com.googlecode.javaewah.EWAHCompressedBitmapprivate final com.googlecode.javaewah.EWAHCompressedBitmapprivate static final ExecutorService(package private) static final byte[]private static final int(package private) static final intprivate final PackIndexprivate final PackReverseIndexprivate final com.googlecode.javaewah.EWAHCompressedBitmapprivate final com.googlecode.javaewah.EWAHCompressedBitmapFields inherited from class org.eclipse.jgit.internal.storage.file.PackBitmapIndex
FLAG_REUSE, packChecksum -
Constructor Summary
ConstructorsConstructorDescriptionPackBitmapIndexV1(InputStream fd, PackBitmapIndex.SupplierWithIOException<PackIndex> packIndexSupplier, PackBitmapIndex.SupplierWithIOException<PackReverseIndex> reverseIndexSupplier, boolean loadParallelRevIndex) PackBitmapIndexV1(InputStream fd, PackIndex packIndex, PackReverseIndex reverseIndex) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintfindPosition(AnyObjectId objectId) Finds the position in the bitmap of the object.intReturns the number of bitmaps in this bitmap index.getObject(int position) Get the object at the bitmap position.intObtain the total number of objects described by this index.(package private) PackIndexinthashCode()com.googlecode.javaewah.EWAHCompressedBitmapofObjectType(com.googlecode.javaewah.EWAHCompressedBitmap bitmap, int type) Returns a bitmap containing positions for objects that have the given Git type.private static com.googlecode.javaewah.EWAHCompressedBitmapreadBitmap(DataInput dataInput) Methods inherited from class org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex
getBitmap, getBitmapsMethods inherited from class org.eclipse.jgit.internal.storage.file.PackBitmapIndex
open, read, read
-
Field Details
-
MAGIC
static final byte[] MAGIC -
OPT_FULL
static final int OPT_FULL- See Also:
-
MAX_XOR_OFFSET
private static final int MAX_XOR_OFFSET- See Also:
-
executor
-
packIndex
-
reverseIndex
-
commits
private final com.googlecode.javaewah.EWAHCompressedBitmap commits -
trees
private final com.googlecode.javaewah.EWAHCompressedBitmap trees -
blobs
private final com.googlecode.javaewah.EWAHCompressedBitmap blobs -
tags
private final com.googlecode.javaewah.EWAHCompressedBitmap tags -
bitmaps
-
-
Constructor Details
-
PackBitmapIndexV1
PackBitmapIndexV1(InputStream fd, PackIndex packIndex, PackReverseIndex reverseIndex) throws IOException - Throws:
IOException
-
PackBitmapIndexV1
PackBitmapIndexV1(InputStream fd, PackBitmapIndex.SupplierWithIOException<PackIndex> packIndexSupplier, PackBitmapIndex.SupplierWithIOException<PackReverseIndex> reverseIndexSupplier, boolean loadParallelRevIndex) throws IOException - Throws:
IOException
-
-
Method Details
-
findPosition
Finds the position in the bitmap of the object.- Specified by:
findPositionin classPackBitmapIndex- Parameters:
objectId- the id for which the bitmap position will be found.- Returns:
- the bitmap id or -1 if the object was not found.
-
getObject
Get the object at the bitmap position.- Specified by:
getObjectin classPackBitmapIndex- Parameters:
position- the id for which the object will be found.- Returns:
- the ObjectId.
- Throws:
IllegalArgumentException- when the item is not found.
-
getObjectCount
public int getObjectCount()Obtain the total number of objects described by this index.getObjectCount() - 1is the largest bit that will be set in a bitmap.- Specified by:
getObjectCountin classPackBitmapIndex- Returns:
- number of objects in this index, and likewise in the associated pack that this index was generated from.
-
ofObjectType
public 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.- Specified by:
ofObjectTypein classPackBitmapIndex- Parameters:
bitmap- the object bitmap.type- the Git type.- Returns:
- the object bitmap with only objects of the Git type.
-
getBitmapCount
public int getBitmapCount()Returns the number of bitmaps in this bitmap index.- Specified by:
getBitmapCountin classPackBitmapIndex- Returns:
- the number of bitmaps in this bitmap index.
-
equals
-
hashCode
public int hashCode() -
getPackIndex
PackIndex getPackIndex() -
readBitmap
private static com.googlecode.javaewah.EWAHCompressedBitmap readBitmap(DataInput dataInput) throws IOException - Throws:
IOException
-