示例#1
0
 private ReadCacheSettings GetReadCacheSettings()
 {
     return(ReadCacheEnabled ?
            new ReadCacheSettings
     {
         MemorySizeBits = Utility.NumBitsPreviousPowerOf2(ReadCacheMemorySize),
         PageSizeBits = Utility.NumBitsPreviousPowerOf2(ReadCachePageSize),
         SecondChanceFraction = ReadCacheSecondChanceFraction
     }
         : null);
 }
示例#2
0
 internal LogSettings GetLogSettings()
 {
     return(new LogSettings
     {
         LogDevice = LogDevice,
         PageSizeBits = Utility.NumBitsPreviousPowerOf2(PageSize),
         SegmentSizeBits = Utility.NumBitsPreviousPowerOf2(SegmentSize),
         MemorySizeBits = ReadOnlyMode ? 0 : Utility.NumBitsPreviousPowerOf2(MemorySize),
         ReadFlags = ReadFlags.None,
         MutableFraction = MutableFraction,
         ObjectLogDevice = null,
         ReadCacheSettings = null
     });
 }
示例#3
0
 internal LogSettings GetLogSettings()
 {
     return(new LogSettings
     {
         ReadFlags = ReadFlags,
         LogDevice = LogDevice,
         ObjectLogDevice = ObjectLogDevice,
         MemorySizeBits = Utility.NumBitsPreviousPowerOf2(MemorySize),
         PageSizeBits = Utility.NumBitsPreviousPowerOf2(PageSize),
         SegmentSizeBits = Utility.NumBitsPreviousPowerOf2(SegmentSize),
         MutableFraction = MutableFraction,
         PreallocateLog = PreallocateLog,
         ReadCacheSettings = GetReadCacheSettings()
     });
 }