public MemTable(int writeBatchSize, InternalKeyComparator internalKeyComparator, BufferPool bufferPool) { CreatedAt = DateTime.UtcNow; _bufferPool = bufferPool; _memoryAccessor = new UnamangedMemoryAccessor(writeBatchSize); _internalKeyComparator = internalKeyComparator; _table = new SkipList<InternalKey, UnamangedMemoryAccessor.MemoryHandle>(_internalKeyComparator); }
public void Add(ulong seq, ItemType type, Slice key, UnamangedMemoryAccessor.MemoryHandle memoryHandle) { var internalKey = new InternalKey(key, seq, type); _table.Insert(internalKey, memoryHandle); }
public Stream Read(UnamangedMemoryAccessor.MemoryHandle handle) { return _memoryAccessor.Read(handle); }