Class WriteOptions
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
Options that control write operations.
Maps to rocksdb_writeoptions_t.
public sealed class WriteOptions : RocksDbHandle, IDisposable
- Inheritance
-
WriteOptions
- Implements
- Inherited Members
Constructors
WriteOptions()
public WriteOptions()
Properties
DisableWal
If true, writes will not first go to the write ahead log and the write may be lost after a crash.
public bool DisableWal { get; set; }
Property Value
IgnoreMissingColumnFamilies
If true, writes to column families that do not exist are ignored rather than failing.
public bool IgnoreMissingColumnFamilies { get; set; }
Property Value
IoActivity
Labels the I/O this write performs. Leave this alone unless you have a reason to override how RocksDb accounts for the operation.
public IoActivity IoActivity { get; set; }
Property Value
LowPriority
If true, this write request is of lower priority.
public bool LowPriority { get; set; }
Property Value
NoSlowdown
If true, return immediately with a RocksDbException if the write request is slowed to prevent OOM errors.
public bool NoSlowdown { get; set; }
Property Value
ProtectionBytesPerKey
Per-key checksum bytes added to the write batch so that corruption in memory is detected before the data is written. Only 0 and 8 are supported.
public ulong ProtectionBytesPerKey { get; set; }
Property Value
Remarks
Zero, the default, disables the check; eight enables it. RocksDb accepts no other width, so a value such as 4 is not a weaker setting but an invalid one.
RateLimiterPriority
Priority this write is given by the rate limiter, if one is configured.
public RateLimiterPriority RateLimiterPriority { get; set; }
Property Value
Sync
If true, the write will be flushed from the OS buffer cache before the write is considered complete.
public bool Sync { get; set; }
Property Value
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().