Class RedbKeyGeneratorBase
Base class for key generation with caching.
Caching logic is database-agnostic, only SQL queries differ.
Static cache shared across all instances for thread-safety.
public abstract class RedbKeyGeneratorBase : IKeyGenerator
Inheritance
Implements
Derived
Methods
GenerateKeysAsync(int)
Generate batch of keys from database sequence.
protected abstract Task<List<long>> GenerateKeysAsync(int count)
NextObjectIdAsync()
Get next object ID (uses shared static cache).
public Task<long> NextObjectIdAsync()
NextObjectIdBatchAsync(int)
Get batch of object IDs.
public Task<long[]> NextObjectIdBatchAsync(int count)
NextValueIdBatchAsync(int)
Get batch of value IDs.
public Task<long[]> NextValueIdBatchAsync(int count)