public synchronized Set<Record> listAll() throws IOException {
  File[] files=directory.listFiles(endingWithDotJson());
  if (files == null) {
    return emptySet();
  }
  Set<Record> records=new HashSet<>();
  for (  File file : files) {
    records.add(loadRecord(file));
  }
  return records;
}

public synchronized Set < Record > listAll ( ) throws IOException { File [ ] files = directory . listFiles ( endingWithDotJson ( ) ) ; if ( files == null ) { return emptySet ( ) ; } Set < Record > records = new HashSet < > ( ) ; for ( File file : files ) { records . add ( loadRecord ( file ) ) ; } return records ; }
list all persisted records from the file system .
