An object database stores one or more Git objects, indexed by their unique
org..
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public void | |
| public boolean | |
| public abstract long | Returns: quick, rough count of objects in this repository,-1 if
an exception occursGet a quick, rough count of objects in this repository. |
| public Set | Returns: the shallow commits of the current repositoryGet the shallow commits of the current repository |
| public boolean | Returns: true if the specified object is stored in this database.identity of the object to test for existence of. objectId)Does the requested object exist in this database? |
| public ObjectDatabase | Returns: new cached database instanceCreate a new cached database instance over this database. |
| public abstract ObjectInserter | Returns: writer the caller can use to create objects in this database.Create a new |
| public abstract ObjectReader | Returns: reader the caller can use to load objects from this database.Create a new |
| public ObjectLoader | Returns: aorg. for accessing the object.identity of the object to open. objectId)Open an object from this database. |
| public ObjectLoader | Returns: aorg. for accessing the
object.identity of the object to open. objectId, int hint about the type of object being requested, e.g.
typeHint)org.;
org. if the
object type is not known, or does not matter to the caller.Open an object from this database. |
| public void | setShallowCommits(Set<ObjectId>
the new shallow commits shallowCommits)Update the shallow commits of the current repository |
| shallowCommits | back to summary |
|---|---|
| private static final Set<ObjectId> shallowCommits | |
| ObjectDatabase | back to summary |
|---|---|
| protected ObjectDatabase() Initialize a new database instance for access. | |
| close | back to summary |
|---|---|
| public abstract void close() Redeclares java. Close any resources held by this database.
| |
| create | back to summary |
|---|---|
| public void create() throws IOException Initialize a new object database at this location.
| |
| exists | back to summary |
|---|---|
| public boolean exists() Does this database exist yet?
| |
| getApproximateObjectCount | back to summary |
|---|---|
| public abstract long getApproximateObjectCount() Get a quick, rough count of objects in this repository. Ignores loose
objects. Returns
| |
| getShallowCommits | back to summary |
|---|---|
| public Set Get the shallow commits of the current repository
| |
| has | back to summary |
|---|---|
| public boolean has(AnyObjectId objectId) throws IOException Does the requested object exist in this database?
This is a one-shot call interface which may be faster than allocating a
| |
| newCachedDatabase | back to summary |
|---|---|
| public ObjectDatabase newCachedDatabase() Create a new cached database instance over this database. This instance might optimize queries by caching some information about database. So some modifications done after instance creation might fail to be noticed.
| |
| newInserter | back to summary |
|---|---|
| public abstract ObjectInserter newInserter() Create a new
The returned inserter is not itself thread-safe, but multiple concurrent
inserter instances created from the same
| |
| newReader | back to summary |
|---|---|
| public abstract ObjectReader newReader() Create a new
The returned reader is not itself thread-safe, but multiple concurrent
reader instances created from the same
| |
| open | back to summary |
|---|---|
| public ObjectLoader open(AnyObjectId objectId) throws IOException Open an object from this database.
This is a one-shot call interface which may be faster than allocating a
| |
| open | back to summary |
|---|---|
| public ObjectLoader open(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, IOException Open an object from this database.
This is a one-shot call interface which may be faster than allocating a
| |
| setShallowCommits | back to summary |
|---|---|
| public void setShallowCommits(Set<ObjectId> shallowCommits) throws IOException Update the shallow commits of the current repository
| |