driver-legacy/src/main/com/mongodb/BulkUpdateRequestBuilder.java
public void replaceOne(final DBObject document) {
        bulkWriteOperation.addRequest(new ReplaceRequest(query, document, upsert, queryCodec, replacementCodec, collation));
    }
public void replaceOne(final DBObject document) {
        bulkWriteOperation.addRequest(new ReplaceRequest(query, document, upsert, queryCodec, replacementCodec, collation));
    }
Adds a request to replace one document in the collection that matches the query with which this builder was created.

@param document the replacement document, which must be structured just as a document you would insert.  It can not contain any
update operators.