C# Класс ScrewTurn.Wiki.SearchEngine.IndexStorerBase

Implements a base class for an index storer.
Instance and static members are thread-safe.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
dataCorrupted bool
disposed bool
index IInMemoryIndex
indexChangedHandler EventHandler
reasonForDataCorruption System.Exception

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

Метод Описание
Dispose ( ) : void

Disposes the current object.

IndexStorerBase ( IInMemoryIndex index ) : System

Initializes a new instance of the IndexStorerBase class.

LoadIndex ( ) : void

Loads the index from the data store the first time.

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

Метод Описание
DeleteData ( DumpedChange data, object state ) : void

Deletes data from the data storage.

Find ( DumpedWord word, IEnumerable list ) : bool

Determines whether a DumpedWord is contained in a list.

Find ( DumpedWordMapping mapping, IEnumerable list ) : bool

Determines whether a DumpedWordMapping is contained in a list.

IndexChangedHandler ( object sender, IndexChangedEventArgs e ) : void

Handles the IInMemoryIndex.IndexChanged events.

InitDataStore ( object state ) : void

Initializes the data storage.

LoadIndexInternal ( DumpedDocument &documents, DumpedWord &words, DumpedWordMapping &mappings ) : void

Loads the index from the data store the first time.

SaveData ( DumpedChange data, object state ) : IndexStorerResult

Stores new data into the data storage.

When saving a new document, the document ID in data.Mappings must be replaced with the currect document ID, generated by the concrete implementation of this method. data.Words should have IDs numbered from uint.MaxValue downwards. The method re-numbers the words appropriately.

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

DeleteData() защищенный абстрактный Метод

Deletes data from the data storage.
protected abstract DeleteData ( DumpedChange data, object state ) : void
data DumpedChange The data to delete.
state object A state object passed from the index.
Результат void

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

Disposes the current object.
public Dispose ( ) : void
Результат void

Find() защищенный статический Метод

Determines whether a DumpedWord is contained in a list.
protected static Find ( DumpedWord word, IEnumerable list ) : bool
word DumpedWord The word.
list IEnumerable The list.
Результат bool

Find() защищенный статический Метод

Determines whether a DumpedWordMapping is contained in a list.
protected static Find ( DumpedWordMapping mapping, IEnumerable list ) : bool
mapping DumpedWordMapping The mapping.
list IEnumerable The list.
Результат bool

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

Handles the IInMemoryIndex.IndexChanged events.
protected IndexChangedHandler ( object sender, IndexChangedEventArgs e ) : void
sender object The sender.
e IndexChangedEventArgs The event arguments.
Результат void

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

Initializes a new instance of the IndexStorerBase class.
If is null.
public IndexStorerBase ( IInMemoryIndex index ) : System
index IInMemoryIndex The index to manage.
Результат System

InitDataStore() защищенный абстрактный Метод

Initializes the data storage.
protected abstract InitDataStore ( object state ) : void
state object A state object passed from the index.
Результат void

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

Loads the index from the data store the first time.
public LoadIndex ( ) : void
Результат void

LoadIndexInternal() защищенный абстрактный Метод

Loads the index from the data store the first time.
protected abstract LoadIndexInternal ( DumpedDocument &documents, DumpedWord &words, DumpedWordMapping &mappings ) : void
documents DumpedDocument The dumped documents.
words DumpedWord The dumped words.
mappings DumpedWordMapping The dumped word mappings.
Результат void

SaveData() защищенный абстрактный Метод

Stores new data into the data storage.
When saving a new document, the document ID in data.Mappings must be replaced with the currect document ID, generated by the concrete implementation of this method. data.Words should have IDs numbered from uint.MaxValue downwards. The method re-numbers the words appropriately.
protected abstract SaveData ( DumpedChange data, object state ) : IndexStorerResult
data DumpedChange The data to store.
state object A state object passed by the index.
Результат IndexStorerResult

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

dataCorrupted защищенное свойство

true if the index data seems corrupted.
protected bool dataCorrupted
Результат bool

disposed защищенное свойство

Indicates whether the object was disposed.
protected bool disposed
Результат bool

index защищенное свойство

The index bound to this storer.
protected IInMemoryIndex index
Результат IInMemoryIndex

indexChangedHandler защищенное свойство

The event handler for the IInMemoryIndex.IndexChanged of the bound index.
protected EventHandler indexChangedHandler
Результат EventHandler

reasonForDataCorruption защищенное свойство

Contains the exception occurred during index setup.
protected Exception,System reasonForDataCorruption
Результат System.Exception