class DfsObjectToPack extends ObjectToPack
Modifier and Type | Field and Description |
---|---|
private static int |
FLAG_FOUND |
(package private) long |
length
Length of the data section of the object.
|
(package private) long |
offset
Offset of the object's header in
pack . |
(package private) DfsPackFile |
pack
Pack to reuse compressed data from, otherwise null.
|
Constructor and Description |
---|
DfsObjectToPack(AnyObjectId src,
int type) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearReuseAsIs()
Forget the reuse information previously stored.
|
(package private) boolean |
isFound() |
void |
select(StoredObjectRepresentation ref)
Remember a specific representation for reuse at a later time.
|
(package private) void |
setFound() |
clearExtendedFlag, getDeltaBase, getDeltaBaseId, getExtendedFlags, getType, isDeltaRepresentation, isExtendedFlag, isReuseAsIs, isWritten, setExtendedFlag, setExtendedFlags, toString
getCRC, getOffset, setCRC, setOffset, setType
equals, fromRaw, fromRaw, fromRaw, fromRaw, fromString, fromString, isId, toObjectId, toString, zeroId
private static final int FLAG_FOUND
DfsPackFile pack
long offset
pack
.long length
DfsObjectToPack(AnyObjectId src, int type)
final boolean isFound()
final void setFound()
protected void clearReuseAsIs()
Implementations may subclass this method, but they must also invoke the
super version with super.clearReuseAsIs()
to ensure the flag is
properly cleared for the writer.
clearReuseAsIs
in class ObjectToPack
public void select(StoredObjectRepresentation ref)
Implementers should remember the representation chosen, so it can be
reused at a later time.
PackWriter
may invoke this
method multiple times for the same object, each time saving the current
best representation found.
select
in class ObjectToPack
ref
- the object representation.