@ SuppressWarnings ( "unchecked" ) public synchronized Map < String , String > listDatabases ( ) throws IOException { storage . checkConnection ( ) ; final ODocument result = new ODocument ( ) ; try { final OChannelBinaryClient network = storage . beginRequest ( OChannelBinaryProtocol . REQUEST_DB_LIST ) ; storage . endRequest ( network ) ; try { storage . beginResponse ( network ) ; result . fromStream ( network . readBytes ( ) ) ; } finally { storage . endResponse ( network ) ; } } catch ( Exception e ) { OLogManager . instance ( ) . exception ( "Cannot retrieve the configuration list" , e , OStorageException . class ) ; storage . close ( true ) ; } return ( Map < String , String > ) result . field ( "databases" ) ; }
List the databases on a remote server .