There's currently no dedicated support for the bulk operations introduced in MongoDB 2.6. If you think these operations are worthwhile to add support for, please raise a ticket in out JIRA.
In the meantime you can use a CollectionCallback
to execute bulk operations on the raw MongoDB collection:
template.execute(new CollectionCallback<Void> {
Void doInCollection(DBCollection collection) {
BulkWriteOperation operation = collection.initialize(Uno|O)rderedBulkOperation();
// bulk code goes here
operation.execute();
return null;
}
}