C# 클래스 ScrewTurn.Wiki.SearchEngine.IndexStorerBase

Implements a base class for an index storer.
Instance and static members are thread-safe.
상속: IDisposable
파일 보기 프로젝트 열기: mono/ScrewTurnWiki 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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