C# Class Lucene.Net.Index.ConcurrentMergeScheduler

A {@link MergeScheduler} that runs each merge using a separate thread, up until a maximum number of threads ({@link #setMaxThreadCount}) at which points merges are run in the foreground, serially. This is a simple way to use concurrency in the indexing process without having to create and manage application level threads.
Inheritance: Lucene.Net.Index.MergeScheduler
ファイルを表示 Open project: synhershko/lucene.net Class Usage Examples

Protected Properties

Property Type Description
dir Lucene.Net.Store.Directory
mergeThreadCount int
mergeThreads IList
writer IndexWriter

Public Methods

Method Description
AnyUnhandledExceptions ( ) : bool

Used for testing

ClearSuppressExceptions ( ) : void

Used for testing

ClearUnhandledExceptions ( ) : void
ConcurrentMergeScheduler ( ) : System.Collections.Generic
Merge ( IndexWriter writer ) : void
SetMergeThreadPriority ( int pri ) : void

Set the priority that merge threads run at.

SetSuppressExceptions ( ) : void

Used for testing

SetTestMode ( ) : void
Sync ( ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void
DoMerge ( MergePolicy merge ) : void

Does the actual merge, by calling IndexWriter.Merge

GetMergeThread ( IndexWriter writer, MergePolicy merge ) : MergeThread

Create and return a new MergeThread

HandleMergeException ( System exc ) : void

Called when an exception is hit in a background merge thread

Private Methods

Method Description
AddMyself ( ) : void

Used for testing

GetMergeThreadPriority ( ) : int
InitMergeThreadPriority ( ) : void
MergeThreadCount ( ) : int
Message ( System message ) : void
Verbose ( ) : bool

Method Details

AnyUnhandledExceptions() public static method

Used for testing
public static AnyUnhandledExceptions ( ) : bool
return bool

ClearSuppressExceptions() public method

Used for testing
public ClearSuppressExceptions ( ) : void
return void

ClearUnhandledExceptions() public static method

public static ClearUnhandledExceptions ( ) : void
return void

ConcurrentMergeScheduler() public method

public ConcurrentMergeScheduler ( ) : System.Collections.Generic
return System.Collections.Generic

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DoMerge() protected method

Does the actual merge, by calling IndexWriter.Merge
protected DoMerge ( MergePolicy merge ) : void
merge MergePolicy
return void

GetMergeThread() protected method

Create and return a new MergeThread
protected GetMergeThread ( IndexWriter writer, MergePolicy merge ) : MergeThread
writer IndexWriter
merge MergePolicy
return MergeThread

HandleMergeException() protected method

Called when an exception is hit in a background merge thread
protected HandleMergeException ( System exc ) : void
exc System
return void

Merge() public method

public Merge ( IndexWriter writer ) : void
writer IndexWriter
return void

SetMergeThreadPriority() public method

Set the priority that merge threads run at.
public SetMergeThreadPriority ( int pri ) : void
pri int
return void

SetSuppressExceptions() public method

Used for testing
public SetSuppressExceptions ( ) : void
return void

SetTestMode() public static method

public static SetTestMode ( ) : void
return void

Sync() public method

public Sync ( ) : void
return void

Property Details

dir protected_oe property

protected Lucene.Net.Store.Directory dir
return Lucene.Net.Store.Directory

mergeThreadCount protected_oe property

protected int mergeThreadCount
return int

mergeThreads protected_oe property

protected IList mergeThreads
return IList

writer protected_oe property

protected IndexWriter,Lucene.Net.Index writer
return IndexWriter