private class PackInserter.Reader extends ObjectReader
| Modifier and Type | Class and Description |
|---|---|
private class |
PackInserter.Reader.StreamLoader |
ObjectReader.Filter| Modifier and Type | Field and Description |
|---|---|
private ObjectReader |
ctx |
OBJ_ANY, streamFileThreshold| Modifier | Constructor and Description |
|---|---|
private |
Reader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ObjectInserter |
getCreatedFromInserter()
Get the
ObjectInserter from which this
reader was created using inserter.newReader() |
java.util.Set<ObjectId> |
getShallowCommits()
Returns IDs for those commits which should be considered as shallow.
|
private byte[] |
inflate(PackedObjectInfo obj,
long zpos,
int sz) |
ObjectReader |
newReader()
Construct a new reader from the same data.
|
ObjectLoader |
open(AnyObjectId objectId,
int typeHint)
Open an object from this database.
|
java.util.Collection<ObjectId> |
resolve(AbbreviatedObjectId id)
Resolve an abbreviated ObjectId to its full form.
|
abbreviate, abbreviate, getBitmapIndex, getObjectSize, getObjectSize, getStreamFileThreshold, has, has, open, open, setAvoidUnreachableObjects, setStreamFileThresholdprivate final ObjectReader ctx
public ObjectReader newReader()
ObjectReaderApplications can use this method to build a new reader from the same data source, but for an different thread.
newReader in class ObjectReaderpublic ObjectInserter getCreatedFromInserter()
ObjectReaderObjectInserter from which this
reader was created using inserter.newReader()getCreatedFromInserter in class ObjectReaderObjectInserter from which this
reader was created using inserter.newReader(), or null if
this reader was not created from an inserter.public java.util.Collection<ObjectId> resolve(AbbreviatedObjectId id) throws java.io.IOException
ObjectReaderresolve in class ObjectReaderid - abbreviated id to resolve to a complete identity. The
abbreviation must have a length of at least 2.java.io.IOException - the object store cannot be read.public ObjectLoader open(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
ObjectReaderopen in class ObjectReaderobjectId - identity of the object to open.typeHint - hint about the type of object being requested, e.g.
Constants.OBJ_BLOB;
ObjectReader.OBJ_ANY if the object type is not known, or does not
matter to the caller.ObjectLoader for accessing the
object.MissingObjectException - the object does not exist.IncorrectObjectTypeException - typeHint was not OBJ_ANY, and the object's actual type does
not match typeHint.java.io.IOException - the object store cannot be accessed.private byte[] inflate(PackedObjectInfo obj, long zpos, int sz) throws java.io.IOException, CorruptObjectException
java.io.IOExceptionCorruptObjectExceptionpublic java.util.Set<ObjectId> getShallowCommits() throws java.io.IOException
ObjectReadergetShallowCommits in class ObjectReaderjava.io.IOExceptionpublic void close()
ObjectReaderRelease any resources used by this reader.
A reader that has been released can be used again, but may need to be released after the subsequent usage.
close in interface java.lang.AutoCloseableclose in class ObjectReader