CSharpTest.Net
ExistingLogAction Enumeration
Example  See Also  Send Feedback Download Help File
CSharpTest.Net.BPlusTree Assembly > CSharpTest.Net.Collections Namespace : ExistingLogAction Enumeration

Glossary Item Box

Defines the action to perform when opening a BPlusTree with an existing log file.

Syntax

Visual Basic (Declaration) 
Public Enum ExistingLogAction 
   Inherits System.Enum
C# 
public enum ExistingLogAction : System.Enum 

Members

MemberDescription
DefaultInfers the default wether or not the data file was created. For newly created data files (CreatePolicy = Always, or IfNeeded and the file is missing) the default will be Truncate. When existing data files are opened the default will ReplayAndCommit.
IgnoreIgnore the existing entries in the log
ReplayReplay the log entries uncommitted
ReplayAndCommitReplay the log entries and commit the changes to the store
TruncateIgnore the existing entries and truncate the log

Example

BPlusTree/BPlusTree.Test/BasicTestsVersion2.cs

C#Copy Code
var options = (BPlusTree<int, string>.OptionsV2)Options;

Assert.AreEqual(ExistingLogAction.Default, options.ExistingLogAction);
options.ExistingLogAction = ExistingLogAction.Ignore;
Assert.AreEqual(ExistingLogAction.Ignore, options.ExistingLogAction);

Assert.AreEqual(-1, options.TransactionLogLimit);
options.TransactionLogLimit = int.MaxValue;
Assert.AreEqual(int.MaxValue, options.TransactionLogLimit);
VB.NETCopy Code
Dim options As var = DirectCast(Options, BPlusTree(Of Integer, String).OptionsV2)

Assert.AreEqual(ExistingLogAction.[Default], options.ExistingLogAction)
options.ExistingLogAction = ExistingLogAction.Ignore
Assert.AreEqual(ExistingLogAction.Ignore, options.ExistingLogAction)

Assert.AreEqual(-1, options.TransactionLogLimit)
options.TransactionLogLimit = Integer.MaxValue
Assert.AreEqual(Integer.MaxValue, options.TransactionLogLimit)

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         CSharpTest.Net.Collections.ExistingLogAction

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys