public synchronized void open ( ) throws IOException { if ( tmap != null ) { return ; } final RecordManager rm = createRecordManager ( indexPath ) ; if ( valueSerializer == null ) { tmap = rm . treeMap ( IndexerConstants . INDEX_TREE_KEY ) ; } else { tmap = rm . treeMap ( IndexerConstants . INDEX_TREE_KEY , valueSerializer ) ; } if ( tmap . isEmpty ( ) ) { rm . close ( ) ; throw new IOException ( "tree map is empty" ) ; } invTmap = tmap . inverseHashView ( IndexerConstants . INVERSE_KEY ) ; }
Opens the index for subsequent lookups .