Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }
Exemple #3
0
 public static JournalAppender Create(ulong nextEntryId, ICommandStore store)
 {
     return(Create(nextEntryId, store.CreateJournalWriter(nextEntryId)));
 }