use of org.springframework.data.mongodb.core.BulkOperations in project spring-integration by spring-projects.
the class MongoDbMessageStore method bulkRemove.
private void bulkRemove(Object groupId, Collection<UUID> ids) {
BulkOperations bulkOperations = this.template.bulkOps(BulkOperations.BulkMode.ORDERED, this.collectionName);
for (UUID id : ids) {
bulkOperations.remove(whereMessageIdIsAndGroupIdIs(id, groupId));
}
bulkOperations.execute();
}
use of org.springframework.data.mongodb.core.BulkOperations in project spring-integration by spring-projects.
the class MongoDbTests method createPersons.
private void createPersons() {
BulkOperations bulkOperations = this.mongoTemplate.bulkOps(BulkOperations.BulkMode.ORDERED, COLLECTION_NAME);
bulkOperations.insert(Arrays.asList(this.createPerson("Artem"), this.createPerson("Gary"), this.createPerson("Oleg"), this.createPerson("Xavi")));
bulkOperations.execute();
}
use of org.springframework.data.mongodb.core.BulkOperations in project spring-integration by spring-projects.
the class MongoDbOutboundGatewayTests method setUp.
@Before
public void setUp() {
BulkOperations bulkOperations = this.mongoTemplate.bulkOps(BulkOperations.BulkMode.ORDERED, COLLECTION_NAME);
bulkOperations.insert(Arrays.asList(this.createPerson("Artem"), this.createPerson("Gary"), this.createPerson("Oleg"), this.createPerson("Xavi")));
bulkOperations.execute();
}
Aggregations