class PersistentManager implements Closeable {

    synchronized List<FilterRecord<? extends F>> recoverFilters(BloomFilterFactory<? extends F, ?> factory,
                                                                boolean allowRecoverFromCorruptedFile)
            throws IOException {
        final List<FilterRecord<? extends F>> records = new ArrayList<>();
        if (persistentFilePath().toFile().exists()) {
            records.addAll(recoverFiltersFromFile(factory, allowRecoverFromCorruptedFile, persistentFilePath()));
        }

        if (temporaryPersistentFilePath().toFile().exists()) {
            try {
                records.addAll(recoverFiltersFromFile(factory, allowRecoverFromCorruptedFile, temporaryPersistentFilePath()));
            } catch (IOException | PersistentStorageException ex) {
                logger.warn("Failed to recover from the file: \"{}\" and got error msg: \"{}\". We just ignore it and carry on.",
                        temporaryPersistentFilePath(), ex.getMessage());
            }
        }

        return records;
    }

      PersistentManager(Path persistentPath);

}