@Test public void testReadOak16GCLog() throws Exception { createOak16GCLog(); GCJournal gcJournal = new GCJournal(getPersistence().getGCJournalFile()); GCJournalEntry entry = gcJournal.read(); assertEquals(45919825920L, entry.getRepoSize()); assertEquals(41394306048L, entry.getReclaimedSize()); assertEquals(1493819563098L, entry.getTs()); assertEquals(newGCGeneration(1, 1, false), entry.getGcGeneration()); assertEquals(42, entry.getNodes()); assertEquals(RecordId.NULL.toString10(), entry.getRoot()); }
public synchronized GCJournalEntry read() { if (latest == null) { List<String> all = readLines(); if (all.isEmpty()) { latest = GCJournalEntry.EMPTY; } else { String info = all.get(all.size() - 1); latest = GCJournalEntry.fromString(info); } } return latest; }
GCJournal { public synchronized GCJournalEntry read() { if (latest == null) { List<String> all = readLines(); if (all.isEmpty()) { latest = GCJournalEntry.EMPTY; } else { String info = all.get(all.size() - 1); latest = GCJournalEntry.fromString(info); } } return latest; } }
GCJournal { public synchronized GCJournalEntry read() { if (latest == null) { List<String> all = readLines(); if (all.isEmpty()) { latest = GCJournalEntry.EMPTY; } else { String info = all.get(all.size() - 1); latest = GCJournalEntry.fromString(info); } } return latest; } GCJournal(@NotNull GCJournalFile journalFile); }
GCJournal { public synchronized GCJournalEntry read() { if (latest == null) { List<String> all = readLines(); if (all.isEmpty()) { latest = GCJournalEntry.EMPTY; } else { String info = all.get(all.size() - 1); latest = GCJournalEntry.fromString(info); } } return latest; } GCJournal(@NotNull GCJournalFile journalFile); synchronized void persist(long reclaimedSize, long repoSize,
            @NotNull GCGeneration gcGeneration, long nodes, @NotNull String root
    ); synchronized GCJournalEntry read(); synchronized Collection<GCJournalEntry> readAll(); }
GCJournal { public synchronized GCJournalEntry read() { if (latest == null) { List<String> all = readLines(); if (all.isEmpty()) { latest = GCJournalEntry.EMPTY; } else { String info = all.get(all.size() - 1); latest = GCJournalEntry.fromString(info); } } return latest; } GCJournal(@NotNull GCJournalFile journalFile); synchronized void persist(long reclaimedSize, long repoSize,
            @NotNull GCGeneration gcGeneration, long nodes, @NotNull String root
    ); synchronized GCJournalEntry read(); synchronized Collection<GCJournalEntry> readAll();  }