-1

How to split the list and execute parallelly.
My Scenario--
I am getting 1000+ vehicles using below list from webservices.

List<Vehicle> vehicleList = vehicleServices.getVehicles();

I want to split 100 vehicles each list and execute all list parallelly.
Thanks

Sanjay Kumar
  • 309
  • 2
  • 5
  • 9

1 Answers1

0

You can use ParallelStream. Check the doc to know more abour java parallelism

stinepike
  • 54,068
  • 14
  • 92
  • 112