|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.lib.AnyObjectId org.eclipse.jgit.lib.ObjectId org.eclipse.jgit.lib.ObjectIdOwnerMap.Entry org.eclipse.jgit.transport.PackedObjectInfo org.eclipse.jgit.storage.pack.ObjectToPack
public class ObjectToPack
Per-object state used by PackWriter
.
PackWriter
uses this class to track the things it needs to include in
the newly generated pack file, and how to efficiently obtain the raw data for
each object as they are written to the output stream.
Constructor Summary | |
---|---|
ObjectToPack(AnyObjectId src,
int type)
Construct for the specified object id. |
|
ObjectToPack(RevObject obj)
Construct for the specified object. |
Method Summary | |
---|---|
protected void |
clearExtendedFlag(int flag)
Clear an extended flag bit. |
protected void |
clearReuseAsIs()
Forget the reuse information previously stored. |
ObjectToPack |
getDeltaBase()
|
ObjectId |
getDeltaBaseId()
|
protected int |
getExtendedFlags()
|
int |
getType()
|
boolean |
isDeltaRepresentation()
|
protected boolean |
isExtendedFlag(int flag)
Determine if a particular extended flag bit has been set. |
boolean |
isReuseAsIs()
|
boolean |
isWritten()
Check if object is already written in a pack. |
void |
select(StoredObjectRepresentation ref)
Remember a specific representation for reuse at a later time. |
protected void |
setExtendedFlag(int flag)
Set an extended flag bit. |
protected void |
setExtendedFlags(int extFlags)
Set the extended flags used by the subclass. |
String |
toString()
|
Methods inherited from class org.eclipse.jgit.transport.PackedObjectInfo |
---|
getCRC, getOffset, setCRC, setOffset |
Methods inherited from class org.eclipse.jgit.lib.ObjectId |
---|
equals, fromRaw, fromRaw, fromRaw, fromRaw, fromString, fromString, isId, toObjectId, toString, zeroId |
Methods inherited from class org.eclipse.jgit.lib.AnyObjectId |
---|
abbreviate, compareTo, compareTo, compareTo, compareTo, copy, copyRawTo, copyRawTo, copyRawTo, copyRawTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, equals, equals, equals, getByte, getFirstByte, getName, hashCode, name, startsWith |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectToPack(AnyObjectId src, int type)
src
- object id of object for packingtype
- real type code of the object, not its in-pack type.public ObjectToPack(RevObject obj)
obj
- identity of the object that will be packed. The object's
parsed status is undefined here. Implementers must not rely on
the object being parsed.Method Detail |
---|
public ObjectId getDeltaBaseId()
public ObjectToPack getDeltaBase()
public boolean isDeltaRepresentation()
public boolean isWritten()
public int getType()
public boolean isReuseAsIs()
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.
protected int getExtendedFlags()
protected boolean isExtendedFlag(int flag)
getExtendedFlags()
and testing the result.
flag
- the flag mask to test, must be between 0x0 and 0xf.
protected void setExtendedFlag(int flag)
flag
- the bits to set, must be between 0x0 and 0xf.protected void clearExtendedFlag(int flag)
flag
- the bits to clear, must be between 0x0 and 0xf.protected void setExtendedFlags(int extFlags)
extFlags
- additional flag bits to store in the flags field. Due to space
constraints only values [0x0, 0xf] are permitted.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.
ref
- the object representation.public String toString()
toString
in class AnyObjectId
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |