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 classes/interfaces inherited from class org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex
BasePackBitmapIndex.StoredBitmap
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectIdOwnerMap
<BasePackBitmapIndex.StoredBitmap> private final com.googlecode.javaewah.EWAHCompressedBitmap
private final com.googlecode.javaewah.EWAHCompressedBitmap
(package private) static final byte[]
private static final int
(package private) static final int
private final PackIndex
private final PackReverseIndex
private final com.googlecode.javaewah.EWAHCompressedBitmap
private final com.googlecode.javaewah.EWAHCompressedBitmap
Fields inherited from class org.eclipse.jgit.internal.storage.file.PackBitmapIndex
FLAG_REUSE, packChecksum
-
Constructor Summary
ConstructorsConstructorDescriptionPackBitmapIndexV1
(InputStream fd, PackIndex packIndex, PackReverseIndex reverseIndex) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
findPosition
(AnyObjectId objectId) Finds the position in the bitmap of the object.int
Returns the number of bitmaps in this bitmap index.getObject
(int position) Get the object at the bitmap position.int
Obtain the total number of objects described by this index.(package private) PackIndex
int
hashCode()
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.private static com.googlecode.javaewah.EWAHCompressedBitmap
readBitmap
(DataInput dataInput) Methods inherited from class org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex
getBitmap, getBitmaps
Methods inherited from class org.eclipse.jgit.internal.storage.file.PackBitmapIndex
open, 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:
-
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
-
-
Method Details
-
findPosition
Finds the position in the bitmap of the object.- Specified by:
findPosition
in 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:
getObject
in 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() - 1
is the largest bit that will be set in a bitmap.- Specified by:
getObjectCount
in 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:
ofObjectType
in 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:
getBitmapCount
in 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
-