Table of Contents

Class OptimisticTransactionDbOptions

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

Settings for opening an OptimisticTransactionDb. Maps to rocksdb_optimistictransactiondb_options_t.

public sealed class OptimisticTransactionDbOptions : RocksDbHandle, IDisposable
Inheritance
OptimisticTransactionDbOptions
Implements
Inherited Members

Remarks

These are copied at open, so an instance may be disposed as soon as the database is open. That is unlike DbOptions, which the database takes ownership of.

Constructors

OptimisticTransactionDbOptions()

Creates options with RocksDb's defaults.

public OptimisticTransactionDbOptions()

Properties

OccLockBucketCount

How many lock buckets to allocate for this database, when it is not sharing a set.

public uint OccLockBucketCount { get; set; }

Property Value

uint

Remarks

Only ValidateParallel uses these. Setting SetSharedLockBuckets(OccLockBuckets?) supersedes this, since a shared set brings its own count.

ValidatePolicy

When a committing transaction validates what it read.

public OccValidationPolicy ValidatePolicy { get; set; }

Property Value

OccValidationPolicy

Methods

DisposeHandle()

Releases the native handle. Called during disposal.

protected override void DisposeHandle()

Remarks

Protected rather than public: it destroys the native object without marking this instance disposed or clearing the handle, so calling it from outside and then disposing normally would free the same pointer twice. It was the most Dispose-looking member on the type. Callers want Dispose().

SetSharedLockBuckets(OccLockBuckets?)

Uses lockBuckets instead of allocating a set for this database alone, or passes null to go back to a private set.

public OptimisticTransactionDbOptions SetSharedLockBuckets(OccLockBuckets? lockBuckets)

Parameters

lockBuckets OccLockBuckets

Returns

OptimisticTransactionDbOptions

Remarks

RocksDb takes its own reference, so the caller keeps ownership and may dispose the buckets once every database sharing them is open.