org.springframework.data.mongodb.core.MongoTemplate.bulkOps()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中org.springframework.data.mongodb.core.MongoTemplate.bulkOps()方法的一些代码示例,展示了MongoTemplate.bulkOps()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MongoTemplate.bulkOps()方法的具体详情如下:
包路径:org.springframework.data.mongodb.core.MongoTemplate
类名称:MongoTemplate
方法名:bulkOps

MongoTemplate.bulkOps介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-data-mongodb

public BulkOperations bulkOps(BulkMode bulkMode, String collectionName) {
  return bulkOps(bulkMode, null, collectionName);
}

代码示例来源:origin: spring-projects/spring-data-mongodb

public BulkOperations bulkOps(BulkMode bulkMode, Class<?> entityClass) {
  return bulkOps(bulkMode, entityClass, operations.determineCollectionName(entityClass));
}

代码示例来源:origin: spring-projects/spring-data-mongodb

@Override
public BulkWriteResult bulk(Collection<? extends T> objects) {
  Assert.notNull(objects, "Objects must not be null!");
  return template.bulkOps(bulkMode != null ? bulkMode : BulkMode.ORDERED, domainType, getCollectionName())
      .insert(new ArrayList<>(objects)).execute();
}

代码示例来源:origin: org.springframework.data/spring-data-mongodb

public BulkOperations bulkOps(BulkMode bulkMode, String collectionName) {
  return bulkOps(bulkMode, null, collectionName);
}

代码示例来源:origin: org.springframework.data/spring-data-mongodb

public BulkOperations bulkOps(BulkMode bulkMode, Class<?> entityClass) {
  return bulkOps(bulkMode, entityClass, operations.determineCollectionName(entityClass));
}

代码示例来源:origin: org.springframework.data/spring-data-mongodb

@Override
public BulkWriteResult bulk(Collection<? extends T> objects) {
  Assert.notNull(objects, "Objects must not be null!");
  return template.bulkOps(bulkMode != null ? bulkMode : BulkMode.ORDERED, domainType, getCollectionName())
      .insert(new ArrayList<>(objects)).execute();
}

代码示例来源:origin: spring-projects/spring-integration

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();
}

代码示例来源:origin: org.springframework.integration/spring-integration-mongodb

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();
}

代码示例来源:origin: zhangtr/canal-mongo

BulkOperations testBulk = naiveMongoTemplate.bulkOps(BulkOperations.BulkMode.ORDERED, tableName);
List<EventData> list = dataMap.get(tableName);
for (EventData eventData : list) {

相关文章