示例#1
0
        public static TFChunk FromOngoingFile(string filename, int writePosition, bool checkSize)
        {
            var chunk = new TFChunk(filename, ESConsts.TFChunkInitialReaderCount, ESConsts.TFChunkMaxReaderCount, TFConsts.MidpointsDepth);

            try
            {
                chunk.InitOngoing(writePosition, checkSize);
            }
            catch
            {
                chunk.Dispose();
                throw;
            }
            return(chunk);
        }
示例#2
0
        public static TFChunk FromOngoingFile(string filename, int writePosition, bool checkSize, bool unbuffered,
                                              bool writethrough, int initialReaderCount, int maxReaderCount, bool reduceFileCachePressure)
        {
            var chunk = new TFChunk(filename,
                                    initialReaderCount,
                                    maxReaderCount,
                                    TFConsts.MidpointsDepth,
                                    false,
                                    unbuffered,
                                    writethrough, reduceFileCachePressure);

            try {
                chunk.InitOngoing(writePosition, checkSize);
            } catch {
                chunk.Dispose();
                throw;
            }

            return(chunk);
        }
示例#3
0
 public static TFChunk FromOngoingFile(string filename, int writePosition, bool checkSize)
 {
     var chunk = new TFChunk(filename, ESConsts.TFChunkInitialReaderCount, ESConsts.TFChunkMaxReaderCount,
                             TFConsts.MidpointsDepth, false);
     try
     {
         chunk.InitOngoing(writePosition, checkSize);
     }
     catch
     {
         chunk.Dispose();
         throw;
     }
     return chunk;
 }