Class StoredObjectRepresentation
java.lang.Object
org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation
- Direct Known Subclasses:
DfsObjectRepresentation
,LocalObjectRepresentation
An object representation
PackWriter
can consider for
packing.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Only available after inflating to canonical format.static final int
Stored in pack format, as a delta to another object.static final int
Stored in pack format, without delta.static final int
Special unknown value forgetWeight()
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet identity of the object this delta applies to in order to recover the original object content.int
Get the storage format typeint
Get relative size of this object's packed form.boolean
Whether the current representation of the object has had delta compression attempted on it.
-
Field Details
-
WEIGHT_UNKNOWN
public static final int WEIGHT_UNKNOWNSpecial unknown value forgetWeight()
.- See Also:
-
PACK_DELTA
public static final int PACK_DELTAStored in pack format, as a delta to another object.- See Also:
-
PACK_WHOLE
public static final int PACK_WHOLEStored in pack format, without delta.- See Also:
-
FORMAT_OTHER
public static final int FORMAT_OTHEROnly available after inflating to canonical format.- See Also:
-
-
Constructor Details
-
StoredObjectRepresentation
public StoredObjectRepresentation()
-
-
Method Details
-
getWeight
public int getWeight()Get relative size of this object's packed form.- Returns:
- relative size of this object's packed form. The special value
WEIGHT_UNKNOWN
can be returned to indicate the implementation doesn't know, or cannot supply the weight up front.
-
getFormat
public int getFormat()Get the storage format type- Returns:
- the storage format type, which must be one of
PACK_DELTA
,PACK_WHOLE
, orFORMAT_OTHER
.
-
getDeltaBase
Get identity of the object this delta applies to in order to recover the original object content.- Returns:
- identity of the object this delta applies to in order to recover
the original object content. This method should only be called if
getFormat()
returnedPACK_DELTA
.
-
wasDeltaAttempted
public boolean wasDeltaAttempted()Whether the current representation of the object has had delta compression attempted on it.- Returns:
- whether the current representation of the object has had delta compression attempted on it.
-