Ejemplo n.º 1
0
        internal bool ContainsValuesAndDoesNotTouchGeneration(uint fileId, long dontTouchGeneration)
        {
            var info = FileCollection.FileInfoByIdx(fileId);

            if (info == null)
            {
                return(false);
            }
            if (info.Generation >= dontTouchGeneration)
            {
                return(false);
            }
            return(info.FileType == KVFileType.TransactionLog || info.FileType == KVFileType.PureValues);
        }
Ejemplo n.º 2
0
        internal long GetGeneration(uint fileId)
        {
            if (fileId == 0)
            {
                return(-1);
            }
            var fileInfo = FileCollection.FileInfoByIdx(fileId);

            if (fileInfo == null)
            {
                throw new ArgumentOutOfRangeException(nameof(fileId));
            }
            return(fileInfo.Generation);
        }