@Test public void shouldThrowStorageExceptionIfExceptionThrownInCallToGetAllSnapshots() throws Exception { throwOnDBIOpen(new SnapshotStoreMethodSimpleCallable() { @Override public void setup(OnDiskSnapshotsStore onDiskSnapshotsStore) throws Exception { } @Override public void runThrowingMethod(OnDiskSnapshotsStore onDiskSnapshotsStore) throws Exception { onDiskSnapshotsStore.getAllSnapshotsFromLatestToOldest(); } }); }
public List<SnapshotMetadata> getAllSnapshotsFromLatestToOldest() throws StorageException { checkInitialized(); return getMatchingOrderedSnapshots(MATCH_EVERYTHING_PREDICATE); }
OnDiskSnapshotsStore implements SnapshotsStore { public List<SnapshotMetadata> getAllSnapshotsFromLatestToOldest() throws StorageException { checkInitialized(); return getMatchingOrderedSnapshots(MATCH_EVERYTHING_PREDICATE); } }
OnDiskSnapshotsStore implements SnapshotsStore { public List<SnapshotMetadata> getAllSnapshotsFromLatestToOldest() throws StorageException { checkInitialized(); return getMatchingOrderedSnapshots(MATCH_EVERYTHING_PREDICATE); } OnDiskSnapshotsStore(DBI dbi, String snapshotsDirectory); }
OnDiskSnapshotsStore implements SnapshotsStore { public List<SnapshotMetadata> getAllSnapshotsFromLatestToOldest() throws StorageException { checkInitialized(); return getMatchingOrderedSnapshots(MATCH_EVERYTHING_PREDICATE); } OnDiskSnapshotsStore(DBI dbi, String snapshotsDirectory); void initialize(); void teardown(); @Override ExtendedSnapshotWriter newSnapshotWriter(); @SuppressWarnings("ConstantConditions") @Override void storeSnapshot(ExtendedSnapshotWriter snapshotWriter); @Override @Nullable ExtendedSnapshot getLatestSnapshot(); List<SnapshotMetadata> getAllSnapshotsFromLatestToOldest(); void pruneSnapshots(final int numSnapshotsToKeep); void reconcileSnapshots(); }
OnDiskSnapshotsStore implements SnapshotsStore { public List<SnapshotMetadata> getAllSnapshotsFromLatestToOldest() throws StorageException { checkInitialized(); return getMatchingOrderedSnapshots(MATCH_EVERYTHING_PREDICATE); } OnDiskSnapshotsStore(DBI dbi, String snapshotsDirectory); void initialize(); void teardown(); @Override ExtendedSnapshotWriter newSnapshotWriter(); @SuppressWarnings("ConstantConditions") @Override void storeSnapshot(ExtendedSnapshotWriter snapshotWriter); @Override @Nullable ExtendedSnapshot getLatestSnapshot(); List<SnapshotMetadata> getAllSnapshotsFromLatestToOldest(); void pruneSnapshots(final int numSnapshotsToKeep); void reconcileSnapshots();  }