@Test public void shouldReturnLastRecord() throws Exception { JournalRecord lastRecord = journal.lastRecord(); assertNotNull(lastRecord); assertEquals("j3", lastRecord.getJournalId()); assertEquals(timestamp3.getMilliseconds(), lastRecord.getChangeTimeMillis()); }
@Override public JournalRecord lastRecord() { return this.records == null || this.records.isEmpty() ? null : this.records.lastEntry().getValue(); }
LocalJournal implements ChangeJournal { @Override public JournalRecord lastRecord() { return this.records == null || this.records.isEmpty() ? null : this.records.lastEntry().getValue(); } }
LocalJournal implements ChangeJournal { @Override public JournalRecord lastRecord() { return this.records == null || this.records.isEmpty() ? null : this.records.lastEntry().getValue(); } LocalJournal( String journalLocation,
                         boolean asyncWritesEnabled,
                         int maxDaysToKeepEntries ); protected  LocalJournal( String journalLocation ); }
LocalJournal implements ChangeJournal { @Override public JournalRecord lastRecord() { return this.records == null || this.records.isEmpty() ? null : this.records.lastEntry().getValue(); } LocalJournal( String journalLocation,
                         boolean asyncWritesEnabled,
                         int maxDaysToKeepEntries ); protected  LocalJournal( String journalLocation ); @Override boolean started(); @SuppressWarnings( "rawtypes" ) @Override synchronized void start(); @Override synchronized void shutdown(); @Override void notify( ChangeSet changeSet ); @Override synchronized void addRecords( JournalRecord... records ); @Override synchronized void removeOldRecords(); @Override Records allRecords( boolean descendingOrder ); @Override JournalRecord lastRecord(); @Override Records recordsNewerThan( LocalDateTime changeSetTime,
                                     boolean inclusive,
                                     boolean descendingOrder ); @Override Iterator<NodeKey> changedNodesSince( final long timestamp ); @Override String journalId(); }
LocalJournal implements ChangeJournal { @Override public JournalRecord lastRecord() { return this.records == null || this.records.isEmpty() ? null : this.records.lastEntry().getValue(); } LocalJournal( String journalLocation,
                         boolean asyncWritesEnabled,
                         int maxDaysToKeepEntries ); protected  LocalJournal( String journalLocation ); @Override boolean started(); @SuppressWarnings( "rawtypes" ) @Override synchronized void start(); @Override synchronized void shutdown(); @Override void notify( ChangeSet changeSet ); @Override synchronized void addRecords( JournalRecord... records ); @Override synchronized void removeOldRecords(); @Override Records allRecords( boolean descendingOrder ); @Override JournalRecord lastRecord(); @Override Records recordsNewerThan( LocalDateTime changeSetTime,
                                     boolean inclusive,
                                     boolean descendingOrder ); @Override Iterator<NodeKey> changedNodesSince( final long timestamp ); @Override String journalId();  }