@ Deprecated public List < String > getDatabaseNames ( ) { return new MongoIterableImpl < DBObject > ( null , createOperationExecutor ( ) , ReadConcern . DEFAULT , primary ( ) , options . getRetryReads ( ) ) { @ Override public ReadOperation < BatchCursor < DBObject > > asReadOperation ( ) { return new ListDatabasesOperation < DBObject > ( MongoClient . getCommandCodec ( ) ) ; } } . map ( new Function < DBObject , String > ( ) { @ Override public String apply ( final DBObject result ) { return ( String ) result . get ( "name" ) ; } } ) . into ( new ArrayList < String > ( ) ) ; }
Gets a list of the names of all databases on the connected server .