Table of Contents

Class RateLimiter

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

Limits the rate of I/O operations (bytes per second). Maps to rocksdb_ratelimiter_t.

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

Constructors

RateLimiter(long, long, int)

public RateLimiter(long rateBytesPerSec, long refillPeriodMicros = 100000, int fairness = 10)

Parameters

rateBytesPerSec long

Target I/O rate in bytes per second.

refillPeriodMicros long

Refill period in microseconds (default: 100 ms).

fairness int

Fairness factor between high-priority and low-priority requests (default: 10).

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().