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); }
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; }
// 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; }
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); }