public interface MultiPackIndex
An index over multiple packs
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class(packId, offset) coordinates of an object -
Method Summary
Modifier and TypeMethodDescriptionfind(AnyObjectId objectId) Obtain the location of the object.longMemory size of this multipack indexString[]Obtain the array of packfiles in the MultiPackIndex.booleanhasObject(AnyObjectId oid) Does this index contains the objectvoidresolve(Set<ObjectId> matches, AbbreviatedObjectId id, int matchLimit) Find objects matching the prefix abbreviation.
-
Method Details
-
getPackNames
String[] getPackNames()Obtain the array of packfiles in the MultiPackIndex.The pack ids correspond to positions in this list.
- Returns:
- array of packnames refered in this multipak index
-
hasObject
Does this index contains the object- Parameters:
oid- object id- Returns:
- true of the index knows this the object
-
find
Obtain the location of the object.The returned object can be reused by the implementations. Callers must create a #copy() if they want to keep a reference.
- Parameters:
objectId- objectId to read.- Returns:
- mutable instance with the location or null if not found.
-
resolve
Find objects matching the prefix abbreviation.- Parameters:
matches- set to add any located ObjectIds to. This is an output parameter.id- prefix to search for.matchLimit- maximum number of results to return. At most this many ObjectIds should be added to matches before returning.
-
getMemorySize
long getMemorySize()Memory size of this multipack index- Returns:
- size of this multipack index in memory, in bytes
-