import JournalStore from './JournalStore' ; import { Graph } from './Graph' ; import { TransactionEntry } from './Types' ; /**
 * In-memory journal storage
 *
 */ export default class MemoryJournalStore extends JournalStore { transactions : Array < Array < TransactionEntry > > ; constructor ( graph ) { super ( graph ) ; this . transactions = [ ] ; } countTransactions ( ) { return this . transactions . length ; } putTransaction ( revId , entries ) { super . putTransaction ( revId , entries ) ; this . transactions [ revId ] = entries ; } fetchTransaction ( revId ) { return this . transactions [ revId ] ; } }