Inheritance: IDisposable
Esempio n. 1
0
        private long _logWaitSequenceNumber = 1; // this must be recovered during recovery...

        #endregion Fields

        #region Constructors

        public LogSegmentsHandler(LogWriter logwriter, IRegionManager regionmgr, RootBlockLogSegment[] segments)
        {
            nextChunkBuffer = new BinaryWriter(new MemoryStream());

            this.regionmgr = regionmgr;
            this.logwriter = logwriter;

            _organizeLogSegments(segments);
        }
Esempio n. 2
0
        public static LogWriter LogWriter_NewRegion(IRegionManager regionmgr, ILogReceiver receiver, out int system_reserved_space)
        {
            LogWriter lw = new LogWriter(regionmgr);
            lw.receiver = receiver;
            lw._InitNewRegion(regionmgr, out system_reserved_space);
            lw._InitResume(regionmgr);

            lw.log_handler.prepareLog();

            return lw;
        }
Esempio n. 3
0
        // standard open/resume
        public static LogWriter LogWriter_Resume(IRegionManager regionmgr, ILogReceiver receiver)
        {
            LogWriter lw = new LogWriter(regionmgr);
            lw.receiver = receiver;
            lw._InitResume(regionmgr);

            lw.log_handler.prepareLog();
            return lw;
        }
Esempio n. 4
0
 private void printLogStatus(LogWriter lw, string status)
 {
     LogSegmentsHandler lsh = lw.log_handler;
     Console.WriteLine("---- Log Segments {0} used, {1} free --- [{2}]",
         lsh.activeLogSegments, lsh.emptyLogSegments, status);
 }