コード例 #1
0
ファイル: TFChunk.cs プロジェクト: tone81/EventStore
        public static TFChunk FromCompletedFile(string filename, bool verifyHash)
        {
            var chunk = new TFChunk(filename, ESConsts.TFChunkInitialReaderCount, ESConsts.TFChunkMaxReaderCount, TFConsts.MidpointsDepth);

            try
            {
                chunk.InitCompleted(verifyHash);
            }
            catch
            {
                chunk.Dispose();
                throw;
            }
            return(chunk);
        }
コード例 #2
0
        public static TFChunk FromCompletedFile(string filename, bool verifyHash, bool unbufferedRead,
                                                int initialReaderCount, int maxReaderCount, bool optimizeReadSideCache = false, bool reduceFileCachePressure = false)
        {
            var chunk = new TFChunk(filename, initialReaderCount, maxReaderCount,
                                    TFConsts.MidpointsDepth, false, unbufferedRead, false, reduceFileCachePressure);

            try {
                chunk.InitCompleted(verifyHash, optimizeReadSideCache);
            } catch {
                chunk.Dispose();
                throw;
            }

            return(chunk);
        }
コード例 #3
0
 public static TFChunk FromCompletedFile(string filename, bool verifyHash)
 {
     var chunk = new TFChunk(filename, ESConsts.TFChunkInitialReaderCount, ESConsts.TFChunkMaxReaderCount,
                             TFConsts.MidpointsDepth, false);
     try
     {
         chunk.InitCompleted(verifyHash);
     }
     catch
     {
         chunk.Dispose();
         throw;
     }
     return chunk;
 }