public static < Data extends AbstractKVStorable > DRUMS < Data > createOrOpenTable ( AbstractHashFunction hashFunction , DRUMSParameterSet < Data > gp ) throws IOException { File databaseDirectoryFile = new File ( gp . DATABASE_DIRECTORY ) ; DRUMS < Data > drums = null ; if ( databaseDirectoryFile . exists ( ) ) { drums = openTable ( AccessMode . READ_WRITE , gp ) ; } else { drums = createTable ( hashFunction , gp ) ; } return drums ; }
Creates or opens the table . If the directory doesn t exists it will be created .