C# 클래스 Rebel.Lucene.IndexController

A simple index controller centred around asynchronous queuing of index modifications.
상속: DisposableObject, IRequiresFrameworkContext
파일 보기 프로젝트 열기: RebelCMS/rebelcmsxu5 1 사용 예제들

공개 메소드들

메소드 설명
CreateDisposableReader ( ) : IndexReader

Creates an index reader. The caller is responsible for disposing the reader when done.

ForceFlushQueue ( ) : void
GetScopedLuceneSearcher ( ) : IndexSearcher

Gets an index searcher by using the reader whose lifetime is managed by GetScopedReader.

GetScopedReader ( ) : IndexReader

Gets a reader that is added to IFrameworkContext.ScopedCache, or returns the one already added. Disposal is handled by IFrameworkContext.ScopedFinalizer.

IndexController ( IndexConfiguration configuration, Func frameworkContextGetter ) : System
IndexController ( IndexConfiguration configuration, IFrameworkContext frameworkContext ) : System
Initialise ( ) : void
PartialFlushQueue ( int flushLimit ) : void
QueueAdd ( Document document ) : void

Queues the addition of an index document.

QueueBatch ( ) : void

Queues a batch of index modifications.

QueueRemoveAll ( ) : void

Queues the removal of all index documents.

Caller should also call ForceFlushQueue if they wish to block until the removal is flushed.

QueueRemoveWhere ( Term term ) : void

Queues the removal of an index document matching the supplied term.

보호된 메소드들

메소드 설명
DisposeResources ( ) : void
FlushQueue ( ) : void

비공개 메소드들

메소드 설명
CreateLuceneReader ( ) : global::Lucene.Net.Index.IndexReader
CreateLuceneReader ( global::Lucene.Net.Store.Directory directory, bool secondAttempt = false ) : global::Lucene.Net.Index.IndexReader
CreateLuceneWriter ( ) : IndexWriter
CreateLuceneWriter ( StandardAnalyzer standardAnalyzer, global::Lucene.Net.Store.Directory directory ) : IndexWriter
CreateTransactionWorker ( ) : TransactionalIndexWorker
EnactBatch ( TransactionalIndexWorker worker, IndexModificationBatch batch ) : void
GetAnalyzer ( ) : StandardAnalyzer
GetBuildLocationInfo ( ) : DirectoryInfo
GetLuceneDirectory ( ) : global::Lucene.Net.Store.Directory
GetLuceneDirectory ( DirectoryInfo directory ) : global::Lucene.Net.Store.Directory
InitialiseBlankIndex ( global::Lucene.Net.Store.Directory directory ) : void
LogQueueMonitorError ( string logMessage, Exception exception ) : void
MonitorIndexBatch ( ) : void

Repeatedly checks IndexModificationQueue for new batches, and calls FlushQueue if any are found.

SetFrameworkContext ( IFrameworkContext frameworkContext ) : void

Sets the framework context. Used within IoC registration to avoid a circular reference / stack overflow because IFrameworkContext has Caches which could have this provider, which needs an IFrameworkContext

StartQueueMonitor ( ) : void

Starts the queue monitor Task.

메소드 상세

CreateDisposableReader() 공개 메소드

Creates an index reader. The caller is responsible for disposing the reader when done.
public CreateDisposableReader ( ) : IndexReader
리턴 IndexReader

DisposeResources() 보호된 메소드

protected DisposeResources ( ) : void
리턴 void

FlushQueue() 보호된 메소드

protected FlushQueue ( ) : void
리턴 void

ForceFlushQueue() 공개 메소드

public ForceFlushQueue ( ) : void
리턴 void

GetScopedLuceneSearcher() 공개 메소드

Gets an index searcher by using the reader whose lifetime is managed by GetScopedReader.
public GetScopedLuceneSearcher ( ) : IndexSearcher
리턴 IndexSearcher

GetScopedReader() 공개 메소드

Gets a reader that is added to IFrameworkContext.ScopedCache, or returns the one already added. Disposal is handled by IFrameworkContext.ScopedFinalizer.
public GetScopedReader ( ) : IndexReader
리턴 IndexReader

IndexController() 공개 메소드

public IndexController ( IndexConfiguration configuration, Func frameworkContextGetter ) : System
configuration IndexConfiguration
frameworkContextGetter Func
리턴 System

IndexController() 공개 메소드

public IndexController ( IndexConfiguration configuration, IFrameworkContext frameworkContext ) : System
configuration IndexConfiguration
frameworkContext IFrameworkContext
리턴 System

Initialise() 공개 메소드

public Initialise ( ) : void
리턴 void

PartialFlushQueue() 공개 메소드

public PartialFlushQueue ( int flushLimit ) : void
flushLimit int
리턴 void

QueueAdd() 공개 메소드

Queues the addition of an index document.
public QueueAdd ( Document document ) : void
document Document The document.
리턴 void

QueueBatch() 공개 메소드

Queues a batch of index modifications.
public QueueBatch ( ) : void
리턴 void

QueueRemoveAll() 공개 메소드

Queues the removal of all index documents.
Caller should also call ForceFlushQueue if they wish to block until the removal is flushed.
public QueueRemoveAll ( ) : void
리턴 void

QueueRemoveWhere() 공개 메소드

Queues the removal of an index document matching the supplied term.
public QueueRemoveWhere ( Term term ) : void
term Term The term.
리턴 void