Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.pack

public Class StoredObjectRepresentation

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.internal.storage.dfs.DfsObjectRepresentation, org.eclipse.jgit.internal.storage.file.LocalObjectRepresentation
Imports
org.eclipse.jgit.lib.ObjectId

An object representation org.eclipse.jgit.internal.storage.pack.PackWriter can consider for packing.

Field Summary

Modifier and TypeField and Description
public static final int
FORMAT_OTHER

Only available after inflating to canonical format.

public static final int
PACK_DELTA

Stored in pack format, as a delta to another object.

public static final int
PACK_WHOLE

Stored in pack format, without delta.

public static final int
WEIGHT_UNKNOWN

Special unknown value for getWeight().

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ObjectId

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() returned PACK_DELTA.
getDeltaBase
()

Get identity of the object this delta applies to in order to recover the original object content.

public int

Returns:

the storage format type, which must be one of PACK_DELTA, PACK_WHOLE, or FORMAT_OTHER.
getFormat
()

Get the storage format type

public int

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.
getWeight
()

Get relative size of this object's packed form.

public boolean

Returns:

whether the current representation of the object has had delta compression attempted on it.
wasDeltaAttempted
()

Whether the current representation of the object has had delta compression attempted on it.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FORMAT_OTHERback to summary
public static final int FORMAT_OTHER

Only available after inflating to canonical format.

PACK_DELTAback to summary
public static final int PACK_DELTA

Stored in pack format, as a delta to another object.

PACK_WHOLEback to summary
public static final int PACK_WHOLE

Stored in pack format, without delta.

WEIGHT_UNKNOWNback to summary
public static final int WEIGHT_UNKNOWN

Special unknown value for getWeight().

Constructor Detail

StoredObjectRepresentationback to summary
public StoredObjectRepresentation()

Method Detail

getDeltaBaseback to summary
public ObjectId getDeltaBase()

Get identity of the object this delta applies to in order to recover the original object content.

Returns:ObjectId

identity of the object this delta applies to in order to recover the original object content. This method should only be called if getFormat() returned PACK_DELTA.

getFormatback to summary
public int getFormat()

Get the storage format type

Returns:int

the storage format type, which must be one of PACK_DELTA, PACK_WHOLE, or FORMAT_OTHER.

getWeightback to summary
public int getWeight()

Get relative size of this object's packed form.

Returns:int

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.

wasDeltaAttemptedback to summary
public boolean wasDeltaAttempted()

Whether the current representation of the object has had delta compression attempted on it.

Returns:boolean

whether the current representation of the object has had delta compression attempted on it.