public static synchronized Database lookupDatabaseObject ( String type , String path ) { // A VoltDB extension to work around ENG-6044 /* disabled 14 lines ... Object key = path; HashMap databaseMap; if (type == DatabaseURL.S_FILE) { databaseMap = fileDatabaseMap; key = filePathToKey(path); } else if (type == DatabaseURL.S_RES) { databaseMap = resDatabaseMap; } else if (type == DatabaseURL.S_MEM) { databaseMap = memDatabaseMap; } else { throw (Error.runtimeError( ErrorCode.U_S0500, "DatabaseManager.lookupDatabaseObject()")); } ... disabled 14 lines */ assert ( type == DatabaseURL . S_MEM ) ; java . util . HashMap < String , Database > databaseMap = memDatabaseMap ; String key = path ; // End of VoltDB extension return ( Database ) databaseMap . get ( key ) ; }
Looks up database of a given type and path in the registry . Returns null if there is none .