Exemplo n.º 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);
		}
Exemplo n.º 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);
		}
Exemplo n.º 3
0
		public Stream Read(UnamangedMemoryAccessor.MemoryHandle handle)
		{
			return _memoryAccessor.Read(handle);
		}