Class DfsObjectRepresentation
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation
-
- org.eclipse.jgit.internal.storage.dfs.DfsObjectRepresentation
-
class DfsObjectRepresentation extends StoredObjectRepresentation
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ObjectId
baseId
(package private) int
format
(package private) long
length
(package private) long
offset
(package private) DfsPackFile
pack
-
Fields inherited from class org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation
FORMAT_OTHER, PACK_DELTA, PACK_WHOLE, WEIGHT_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description DfsObjectRepresentation(DfsPackFile pack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectId
getDeltaBase()
Get identity of the object this delta applies to in order to recover the original object content.int
getFormat()
Get the storage format typeint
getWeight()
Get relative size of this object's packed form.boolean
wasDeltaAttempted()
Whether the current representation of the object has had delta compression attempted on it.
-
-
-
Field Detail
-
pack
final DfsPackFile pack
-
format
int format
-
offset
long offset
-
length
long length
-
baseId
ObjectId baseId
-
-
Constructor Detail
-
DfsObjectRepresentation
DfsObjectRepresentation(DfsPackFile pack)
-
-
Method Detail
-
getFormat
public int getFormat()
Get the storage format type- Overrides:
getFormat
in classStoredObjectRepresentation
- Returns:
- the storage format type, which must be one of
StoredObjectRepresentation.PACK_DELTA
,StoredObjectRepresentation.PACK_WHOLE
, orStoredObjectRepresentation.FORMAT_OTHER
.
-
getWeight
public int getWeight()
Get relative size of this object's packed form.- Overrides:
getWeight
in classStoredObjectRepresentation
- Returns:
- relative size of this object's packed form. The special value
StoredObjectRepresentation.WEIGHT_UNKNOWN
can be returned to indicate the implementation doesn't know, or cannot supply the weight up front.
-
getDeltaBase
public ObjectId getDeltaBase()
Get identity of the object this delta applies to in order to recover the original object content.- Overrides:
getDeltaBase
in classStoredObjectRepresentation
- Returns:
- identity of the object this delta applies to in order to recover
the original object content. This method should only be called if
StoredObjectRepresentation.getFormat()
returnedStoredObjectRepresentation.PACK_DELTA
.
-
wasDeltaAttempted
public boolean wasDeltaAttempted()
Whether the current representation of the object has had delta compression attempted on it.- Overrides:
wasDeltaAttempted
in classStoredObjectRepresentation
- Returns:
- whether the current representation of the object has had delta compression attempted on it.
-
-