org.eclipse.jgit.lib.ObjectId s are encoded as a single integer in the
range [0, getObjectCount()). Compressed bitmaps are available at
certain ObjectIds, which represent all of the objects reachable from
that ObjectId (include the ObjectId itself). The meaning of
the positions in the bitmaps can be decoded using getObject(int) and
ofObjectType(EWAHCompressedBitmap, int). Furthermore,
findPosition(AnyObjectId) can be used to build other bitmaps that a
compatible with the encoded bitmaps available from the index.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | PackBitmapIndex.
the return type which is expected from T>get()Supplier that propagates IOException. |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | FLAG_REUSE
Flag bit denoting the bitmap should be reused during index creation. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the bitmap id or -1 if the object was not found.the id for which the bitmap position will be found. objectId)Finds the position in the bitmap of the object. |
| public int | Returns: the number of bitmaps in this bitmap index ready to use.Returns the number of bitmaps in this bitmap index ready to use, not XOR'ed against other entries. |
| public long | Returns: Current size (in bytes) of all base bitmaps in this index.Current size in bytes of all base bitmaps in the index. |
| public EWAHCompressedBitmap | Returns: the bitmap or null if the object was not found.the id for which the bitmap will be found. objectId)Returns the previously constructed bitmap for the object. |
| public int | Returns: the number of bitmaps in this bitmap index.Returns the number of bitmaps in this bitmap index. |
| public ObjectId | |
| public int | Returns: number of objects in this index, and likewise in the associated pack that this index was generated from.Obtain the total number of objects described by this index. |
| public default byte[] | Returns: checksum as a byte arrayFooter checksum applied on the bottom of the pack file. |
| public int | Returns: the number of bitmaps in this bitmap index represented as XOR masks.Returns the number of bitmaps in this bitmap index XOR'ed against other entries. |
| public long | Returns: Current size (in bytes) of all xor bitmaps in this index.Current size in bytes of all XOR'ed bitmaps in the index. |
| public EWAHCompressedBitmap | Returns: the object bitmap with only objects of the Git type.the object bitmap. bitmap, int the Git type. type)Returns a bitmap containing positions for objects that have the given Git type. |
| public static PackBitmapIndex | Returns: a copy of the index in-memory.existing pack .bitmap to read. idxFile, PackIndex the pack index for the corresponding pack file. packIndex, PackReverseIndex the pack reverse index for the corresponding pack file. reverseIndex)Read an existing pack bitmap index file from a buffered stream. |
| public static PackBitmapIndex | Returns: a copy of the index in-memory.stream to read the bitmap index file from. The stream must be
buffered as some small IOs are performed against the stream.
The caller is responsible for closing the stream. fd, PackIndex the pack index for the corresponding pack file. packIndex, PackReverseIndex the pack reverse index for the corresponding pack file. reverseIndex)Read an existing pack bitmap index file from a buffered stream. |
| public static PackBitmapIndex | Returns: a copy of the index in-memory.stream to read the bitmap index file from. The stream must be
buffered as some small IOs are performed against the stream.
The caller is responsible for closing the stream. fd, PackBitmapIndex.the supplier for pack index for the corresponding pack file. packIndexSupplier,the supplier for pack reverse index for the corresponding pack
file. reverseIndexSupplier,whether reverse index should be loaded in parallel loadParallelRevIndex)Read an existing pack bitmap index file from a buffered stream. |
| FLAG_REUSE | back to summary |
|---|---|
| public static final int FLAG_REUSE Flag bit denoting the bitmap should be reused during index creation. | |
| findPosition | back to summary |
|---|---|
| public int findPosition(AnyObjectId objectId) Finds the position in the bitmap of the object.
| |
| getBaseBitmapCount | back to summary |
|---|---|
| public int getBaseBitmapCount() Returns the number of bitmaps in this bitmap index ready to use, not XOR'ed against other entries.
| |
| getBaseBitmapSizeInBytes | back to summary |
|---|---|
| public long getBaseBitmapSizeInBytes() Current size in bytes of all base bitmaps in the index. Resolving xors for bitmaps can affect this size.
| |
| getBitmap | back to summary |
|---|---|
| public EWAHCompressedBitmap getBitmap(AnyObjectId objectId) Returns the previously constructed bitmap for the object.
| |
| getBitmapCount | back to summary |
|---|---|
| public int getBitmapCount() Returns the number of bitmaps in this bitmap index.
| |
| getObject | back to summary |
|---|---|
| public ObjectId getObject(int position) throws IllegalArgumentException Get the object at the bitmap position.
| |
| getObjectCount | back to summary |
|---|---|
| public int getObjectCount() Obtain the total number of objects described by this index.
| |
| getPackChecksum | back to summary |
|---|---|
| public default byte[] getPackChecksum() Footer checksum applied on the bottom of the pack file.
| |
| getXorBitmapCount | back to summary |
|---|---|
| public int getXorBitmapCount() Returns the number of bitmaps in this bitmap index XOR'ed against other entries.
| |
| getXorBitmapSizeInBytes | back to summary |
|---|---|
| public long getXorBitmapSizeInBytes() Current size in bytes of all XOR'ed bitmaps in the index. Resolving xors for bitmaps can affect this size.
| |
| ofObjectType | back to summary |
|---|---|
| public EWAHCompressedBitmap ofObjectType(EWAHCompressedBitmap bitmap, int type) Returns a bitmap containing positions for objects that have the given Git type.
| |
| open | back to summary |
|---|---|
| public static PackBitmapIndex open(File idxFile, PackIndex packIndex, PackReverseIndex reverseIndex) throws IOException Read an existing pack bitmap index file from a buffered stream. The format of the file will be automatically detected and a proper access implementation for that format will be constructed and returned to the caller. The file may or may not be held open by the returned instance.
| |
| read | back to summary |
|---|---|
| public static PackBitmapIndex read(InputStream fd, PackIndex packIndex, PackReverseIndex reverseIndex) throws IOException Read an existing pack bitmap index file from a buffered stream. The format of the file will be automatically detected and a proper access implementation for that format will be constructed and returned to the caller. The file may or may not be held open by the returned instance.
| |
| read | back to summary |
|---|---|
| public static PackBitmapIndex read(InputStream fd, PackBitmapIndex. Read an existing pack bitmap index file from a buffered stream. The format of the file will be automatically detected and a proper access implementation for that format will be constructed and returned to the caller. The file may or may not be held open by the returned instance.
| |
get()
| Modifier and Type | Method and Description |
|---|---|
| public T |
| get | back to summary |
|---|---|
| public T get() throws IOException Get result.
| |