예제 #1
0
		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);
		}
예제 #2
0
		public void Add(ulong seq, ItemType type, Slice key, UnamangedMemoryAccessor.MemoryHandle memoryHandle)
		{
			var internalKey = new InternalKey(key, seq, type);

			_table.Insert(internalKey, memoryHandle);
		}
예제 #3
0
		public Stream Read(UnamangedMemoryAccessor.MemoryHandle handle)
		{
			return _memoryAccessor.Read(handle);
		}