Exemplo n.º 1
0
 public ChunkStorageInKV(long subDBId, IFileCollectionWithFileInfos fileCollection, long maxFileSize)
 {
     _subDBId        = subDBId;
     _fileCollection = fileCollection;
     _maxFileSize    = maxFileSize;
     _keyLen         = -1;
     LoadFiles();
 }
Exemplo n.º 2
0
 public ChunkStorageInKV(long subDBId, IFileCollectionWithFileInfos fileCollection, long maxFileSize)
 {
     _subDBId = subDBId;
     _fileCollection = fileCollection;
     _maxFileSize = maxFileSize;
     _keyLen = -1;
     LoadFiles();
 }
Exemplo n.º 3
0
 public KeyValueDB(IFileCollection fileCollection, ICompressionStrategy compression, uint fileSplitSize, ICompactorScheduler compactorScheduler)
 {
     if (fileCollection == null)
     {
         throw new ArgumentNullException(nameof(fileCollection));
     }
     if (compression == null)
     {
         throw new ArgumentNullException(nameof(compression));
     }
     if (fileSplitSize < 1024 || fileSplitSize > int.MaxValue)
     {
         throw new ArgumentOutOfRangeException(nameof(fileSplitSize), "Allowed range 1024 - 2G");
     }
     _compactorScheduler = compactorScheduler;
     MaxTrLogFileSize    = fileSplitSize;
     _compression        = compression;
     DurableTransactions = false;
     _fileCollection     = new FileCollectionWithFileInfos(fileCollection);
     _lastCommited       = new BTreeRoot(0);
     LoadInfoAboutFiles();
     _compactFunc = _compactorScheduler?.AddCompactAction(Compact);
     _compactorScheduler?.AdviceRunning();
 }