code: @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>());
      }
docs: Gets a list of the names of all databases on the connected server.
  
  @return list of database names
  @throws MongoException  if the operation fails
  @deprecated Replaced with {@link com.mongodb.MongoClient#listDatabaseNames()}