项目实战

影拓邦电影同步中,使用Lists.partition按500条长度进行切分,来实现es的同步。

使用Lists.partition切分性能优化

 切分的List为

使用Lists.partition切分性能优化

 使用介绍及示例

将list集合按指定长度进行切分,返回新的List<List<??>>集合,如下的:

  List<List<Integer>> lists=Lists.partition(numList,切分数);

添加依赖

https://mvnrepository.com/search?q=guava仓库中搜索guava获取依赖

使用Lists.partition切分性能优化

使用Lists.partition切分性能优化

添加依赖到pom文件

使用Lists.partition切分性能优化

示例

使用Lists.partition切分性能优化

 

相关文章:

  • 2022-12-23
  • 2021-05-05
  • 2022-12-23
  • 2021-09-28
  • 2021-09-08
  • 2021-06-29
  • 2022-01-28
  • 2021-12-21
猜你喜欢
  • 2021-06-16
  • 2021-06-04
  • 2021-12-19
  • 2021-08-14
  • 2021-10-23
  • 2021-07-13
  • 2022-12-23
相关资源
相似解决方案