C# Класс GitSharp.Core.ObjectDatabase

Abstraction of arbitrary object storage. An object database stores one or more Git objects, indexed by their unique ObjectId. Optionally an object database can reference one or more alternates; other ObjectDatabase instances that are searched in addition to the current database. Databases are usually divided into two halves: a half that is considered to be fast to search, and a half that is considered to be slow to search. When alternates are present the fast half is fully searched (recursively through all alternates) before the slow half is considered.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
NoAlternates GitSharp.Core.ObjectDatabase[]

Открытые методы

Метод Описание
Dispose ( ) : void
OpenObjectInAllPacks ( ICollection @out, GitSharp.Core.WindowCursor windowCursor, AnyObjectId objectId ) : void

Open the object from all packs containing it. If any alternates are present, their packs are also considered.

OpenObjectInAllPacksImplementation ( ICollection @out, GitSharp.Core.WindowCursor windowCursor, AnyObjectId objectId ) : void

Open the object from all packs containing it. If any alternates are present, their packs are also considered.

close ( ) : void

Close any resources held by this database and its active alternates.

closeAlternates ( ) : void

Fully close all loaded alternates and clear the alternate list.

closeSelf ( ) : void

Close any resources held by this database only; ignoring alternates. To fully close this database and its referenced alternates, the caller should instead invoke close().

create ( ) : void

Initialize a new object database at this location.

exists ( ) : bool

Gets if this database is already created; If it returns false, the caller should invoke create to create this database location.

getAlternates ( ) : GitSharp.Core.ObjectDatabase[]

Get the alternate databases known to this database.

hasObject ( AnyObjectId objectId ) : bool

Does the requested object exist in this database? Alternates (if present) are searched automatically.

hasObject1 ( AnyObjectId objectId ) : bool

Fast half of hasObject(AnyObjectId).

hasObject2 ( string objectName ) : bool

Slow half of hasObject(AnyObjectId).

loadAlternates ( ) : GitSharp.Core.ObjectDatabase[]

Load the list of alternate databases into memory. This method is invoked by getAlternates() if the alternate list has not yet been populated, or if closeAlternates() has been called on this instance and the alternate list is needed again. If the alternate array is empty, implementors should consider using the constant NoAlternates.

openObject ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader

Open an object from this database. Alternates (if present) are searched automatically.

openObject1 ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader

Fast half of openObject(WindowCursor, AnyObjectId).

openObject2 ( GitSharp.Core.WindowCursor curs, string objectName, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader

Slow half of openObject(WindowCursor, AnyObjectId).

tryAgain1 ( ) : bool

true if the fast-half search should be tried again.

Защищенные методы

Метод Описание
ObjectDatabase ( ) : System

Initialize a new database instance for access.

closeAlternates ( ObjectDatabase alt ) : void

Приватные методы

Метод Описание
OpenObjectImpl1 ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
OpenObjectImpl2 ( GitSharp.Core.WindowCursor curs, string objectName, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
hasObjectImpl1 ( AnyObjectId objectId ) : bool
hasObjectImpl2 ( string objectId ) : bool

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

ObjectDatabase() защищенный Метод

Initialize a new database instance for access.
protected ObjectDatabase ( ) : System
Результат System

OpenObjectInAllPacks() публичный Метод

Open the object from all packs containing it. If any alternates are present, their packs are also considered.
public OpenObjectInAllPacks ( ICollection @out, GitSharp.Core.WindowCursor windowCursor, AnyObjectId objectId ) : void
@out ICollection
windowCursor GitSharp.Core.WindowCursor /// Temporary working space associated with the calling thread. ///
objectId AnyObjectId of object to search for.
Результат void

OpenObjectInAllPacksImplementation() публичный Метод

Open the object from all packs containing it. If any alternates are present, their packs are also considered.
public OpenObjectInAllPacksImplementation ( ICollection @out, GitSharp.Core.WindowCursor windowCursor, AnyObjectId objectId ) : void
@out ICollection
windowCursor GitSharp.Core.WindowCursor /// Temporary working space associated with the calling thread. ///
objectId AnyObjectId of object to search for.
Результат void

close() публичный Метод

Close any resources held by this database and its active alternates.
public close ( ) : void
Результат void

closeAlternates() публичный Метод

Fully close all loaded alternates and clear the alternate list.
public closeAlternates ( ) : void
Результат void

closeAlternates() защищенный Метод

protected closeAlternates ( ObjectDatabase alt ) : void
alt ObjectDatabase
Результат void

closeSelf() публичный Метод

Close any resources held by this database only; ignoring alternates. To fully close this database and its referenced alternates, the caller should instead invoke close().
public closeSelf ( ) : void
Результат void

create() публичный Метод

Initialize a new object database at this location.
public create ( ) : void
Результат void

exists() публичный Метод

Gets if this database is already created; If it returns false, the caller should invoke create to create this database location.
public exists ( ) : bool
Результат bool

getAlternates() публичный Метод

Get the alternate databases known to this database.
public getAlternates ( ) : GitSharp.Core.ObjectDatabase[]
Результат GitSharp.Core.ObjectDatabase[]

hasObject() публичный Метод

Does the requested object exist in this database? Alternates (if present) are searched automatically.
public hasObject ( AnyObjectId objectId ) : bool
objectId AnyObjectId identity of the object to test for existence of.
Результат bool

hasObject1() публичный абстрактный Метод

Fast half of hasObject(AnyObjectId).
public abstract hasObject1 ( AnyObjectId objectId ) : bool
objectId AnyObjectId /// Identity of the object to test for existence of. ///
Результат bool

hasObject2() публичный Метод

Slow half of hasObject(AnyObjectId).
public hasObject2 ( string objectName ) : bool
objectName string /// Identity of the object to test for existence of. ///
Результат bool

loadAlternates() публичный Метод

Load the list of alternate databases into memory. This method is invoked by getAlternates() if the alternate list has not yet been populated, or if closeAlternates() has been called on this instance and the alternate list is needed again. If the alternate array is empty, implementors should consider using the constant NoAlternates.
/// The alternate list could not be accessed. The empty alternate /// array will be assumed by the caller. ///
public loadAlternates ( ) : GitSharp.Core.ObjectDatabase[]
Результат GitSharp.Core.ObjectDatabase[]

openObject() публичный Метод

Open an object from this database. Alternates (if present) are searched automatically.
public openObject ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
curs GitSharp.Core.WindowCursor /// Temporary working space associated with the calling thread. ///
objectId AnyObjectId Identity of the object to open.
Результат GitSharp.Core.ObjectLoader

openObject1() публичный абстрактный Метод

Fast half of openObject(WindowCursor, AnyObjectId).
public abstract openObject1 ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
curs GitSharp.Core.WindowCursor /// temporary working space associated with the calling thread. ///
objectId AnyObjectId identity of the object to open.
Результат GitSharp.Core.ObjectLoader

openObject2() публичный Метод

Slow half of openObject(WindowCursor, AnyObjectId).
public openObject2 ( GitSharp.Core.WindowCursor curs, string objectName, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
curs GitSharp.Core.WindowCursor /// temporary working space associated with the calling thread. ///
objectName string Name of the object to open.
objectId AnyObjectId identity of the object to open.
Результат GitSharp.Core.ObjectLoader

tryAgain1() публичный Метод

true if the fast-half search should be tried again.
public tryAgain1 ( ) : bool
Результат bool

Описание свойств

NoAlternates защищенное статическое свойство

Constant indicating no alternate databases exist.
protected static ObjectDatabase[],GitSharp.Core NoAlternates
Результат GitSharp.Core.ObjectDatabase[]