C# Class Lucene.Net.Index.TestSnapshotDeletionPolicy

Inheritance: Lucene.Net.Util.LuceneTestCase
Show file Open project: apache/lucenenet Class Usage Examples

Protected Properties

Property Type Description
Snapshots IList

Public Methods

Method Description
BackupIndex ( Directory dir, Lucene.Net.Index.SnapshotDeletionPolicy dp ) : void

Example showing how to use the SnapshotDeletionPolicy to take a backup. this method does not really do a backup; instead, it reads every byte of every file just to test that the files indeed exist and are readable even while the index is changing.

Protected Methods

Method Description
AssertSnapshotExists ( Directory dir, Lucene.Net.Index.SnapshotDeletionPolicy sdp, int numSnapshots, bool checkIndexCommitSame ) : void
CheckMaxDoc ( IndexCommit commit, int expectedMaxDoc ) : void
CheckSnapshotExists ( Directory dir, IndexCommit c ) : void
GetConfig ( Random random, IndexDeletionPolicy dp ) : IndexWriterConfig
PrepareIndexAndSnapshots ( Lucene.Net.Index.SnapshotDeletionPolicy sdp, IndexWriter writer, int numSnapshots ) : void

Private Methods

Method Description
CopyFiles ( Directory dir, IndexCommit cp ) : void
ReadFile ( Directory dir, string name ) : void
RunTest ( Random random, Directory dir ) : void
SetUp ( ) : void
TestBasicSnapshots ( ) : void
TestMissingCommits ( ) : void
TestMultiThreadedSnapshotting ( ) : void
TestReleaseSnapshot ( ) : void
TestRollbackToOldSnapshot ( ) : void
TestSnapshotDeletionPolicy_Mem ( ) : void
TestSnapshotLastCommitTwice ( ) : void

Method Details

AssertSnapshotExists() protected method

protected AssertSnapshotExists ( Directory dir, Lucene.Net.Index.SnapshotDeletionPolicy sdp, int numSnapshots, bool checkIndexCommitSame ) : void
dir Directory
sdp Lucene.Net.Index.SnapshotDeletionPolicy
numSnapshots int
checkIndexCommitSame bool
return void

BackupIndex() public method

Example showing how to use the SnapshotDeletionPolicy to take a backup. this method does not really do a backup; instead, it reads every byte of every file just to test that the files indeed exist and are readable even while the index is changing.
public BackupIndex ( Directory dir, Lucene.Net.Index.SnapshotDeletionPolicy dp ) : void
dir Directory
dp Lucene.Net.Index.SnapshotDeletionPolicy
return void

CheckMaxDoc() protected method

protected CheckMaxDoc ( IndexCommit commit, int expectedMaxDoc ) : void
commit IndexCommit
expectedMaxDoc int
return void

CheckSnapshotExists() protected method

protected CheckSnapshotExists ( Directory dir, IndexCommit c ) : void
dir Directory
c IndexCommit
return void

GetConfig() protected method

protected GetConfig ( Random random, IndexDeletionPolicy dp ) : IndexWriterConfig
random System.Random
dp IndexDeletionPolicy
return IndexWriterConfig

PrepareIndexAndSnapshots() protected method

protected PrepareIndexAndSnapshots ( Lucene.Net.Index.SnapshotDeletionPolicy sdp, IndexWriter writer, int numSnapshots ) : void
sdp Lucene.Net.Index.SnapshotDeletionPolicy
writer IndexWriter
numSnapshots int
return void

Property Details

Snapshots protected property

protected IList Snapshots
return IList