Class FileObjectDatabase
- java.lang.Object
-
- org.eclipse.jgit.lib.ObjectDatabase
-
- org.eclipse.jgit.internal.storage.file.FileObjectDatabase
-
- Direct Known Subclasses:
CachedObjectDirectory
,ObjectDirectory
abstract class FileObjectDatabase extends ObjectDatabase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
FileObjectDatabase.InsertLooseObjectResult
-
Constructor Summary
Constructors Constructor Description FileObjectDatabase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract java.io.File
fileFor(AnyObjectId id)
(package private) abstract Config
getConfig()
(package private) abstract java.io.File
getDirectory()
(package private) abstract FS
getFS()
(package private) abstract long
getObjectSize(WindowCursor curs, AnyObjectId objectId)
(package private) abstract java.util.Collection<PackFile>
getPacks()
(package private) abstract java.util.Set<ObjectId>
getShallowCommits()
(package private) abstract FileObjectDatabase.InsertLooseObjectResult
insertUnpackedObject(java.io.File tmp, ObjectId id, boolean createDuplicate)
ObjectDirectoryInserter
newInserter()
Create a newObjectInserter
to insert new objects.ObjectReader
newReader()
Create a newObjectReader
to read existing objects.(package private) abstract ObjectLoader
openLooseObject(WindowCursor curs, AnyObjectId id)
(package private) abstract ObjectLoader
openObject(WindowCursor curs, AnyObjectId objectId)
(package private) abstract PackFile
openPack(java.io.File pack)
(package private) abstract void
resolve(java.util.Set<ObjectId> matches, AbbreviatedObjectId id)
(package private) abstract void
selectObjectRepresentation(PackWriter packer, ObjectToPack otp, WindowCursor curs)
-
Methods inherited from class org.eclipse.jgit.lib.ObjectDatabase
close, create, exists, has, newCachedDatabase, open, open
-
-
-
-
Method Detail
-
newReader
public ObjectReader newReader()
Create a newObjectReader
to read existing objects.The returned reader is not itself thread-safe, but multiple concurrent reader instances created from the same
ObjectDatabase
must be thread-safe.- Specified by:
newReader
in classObjectDatabase
- Returns:
- reader the caller can use to load objects from this database.
-
newInserter
public ObjectDirectoryInserter newInserter()
Create a newObjectInserter
to insert new objects.The returned inserter is not itself thread-safe, but multiple concurrent inserter instances created from the same
ObjectDatabase
must be thread-safe.- Specified by:
newInserter
in classObjectDatabase
- Returns:
- writer the caller can use to create objects in this database.
-
resolve
abstract void resolve(java.util.Set<ObjectId> matches, AbbreviatedObjectId id) throws java.io.IOException
- Throws:
java.io.IOException
-
getConfig
abstract Config getConfig()
-
getFS
abstract FS getFS()
-
getShallowCommits
abstract java.util.Set<ObjectId> getShallowCommits() throws java.io.IOException
- Throws:
java.io.IOException
-
selectObjectRepresentation
abstract void selectObjectRepresentation(PackWriter packer, ObjectToPack otp, WindowCursor curs) throws java.io.IOException
- Throws:
java.io.IOException
-
getDirectory
abstract java.io.File getDirectory()
-
fileFor
abstract java.io.File fileFor(AnyObjectId id)
-
openObject
abstract ObjectLoader openObject(WindowCursor curs, AnyObjectId objectId) throws java.io.IOException
- Throws:
java.io.IOException
-
getObjectSize
abstract long getObjectSize(WindowCursor curs, AnyObjectId objectId) throws java.io.IOException
- Throws:
java.io.IOException
-
openLooseObject
abstract ObjectLoader openLooseObject(WindowCursor curs, AnyObjectId id) throws java.io.IOException
- Throws:
java.io.IOException
-
insertUnpackedObject
abstract FileObjectDatabase.InsertLooseObjectResult insertUnpackedObject(java.io.File tmp, ObjectId id, boolean createDuplicate) throws java.io.IOException
- Throws:
java.io.IOException
-
openPack
abstract PackFile openPack(java.io.File pack) throws java.io.IOException
- Throws:
java.io.IOException
-
getPacks
abstract java.util.Collection<PackFile> getPacks()
-
-