public void SetUp() { Directory.CreateDirectory(_path); _config = new EngineConfiguration(); _config.JournalPath = _path; _config.MaxEntriesPerJournalSegment = 10; _store = new FileCommandStore(_config); _store.Initialize(); var writer = _store.CreateJournalWriter(0); for (ulong i = 0; i < 30; i++) { writer.Write(new JournalEntry<Command>(i + 1, new TestCommandWithoutResult())); } writer.Close(); }
public void SetUp() { Directory.CreateDirectory(_path); _config = new EngineConfiguration(); _config.JournalPath = _path; _config.MaxEntriesPerJournalSegment = 10; _store = new FileCommandStore(_config); _store.Initialize(); var writer = _store.CreateJournalWriter(0); for (ulong i = 0; i < 30; i++) { writer.Write(new JournalEntry <Command>(i + 1, new TestCommandWithoutResult())); } writer.Close(); }
public static JournalAppender Create(ulong nextEntryId, ICommandStore store) { return(Create(nextEntryId, store.CreateJournalWriter(nextEntryId))); }