Subversion Repositories SmartDukaan

Rev

Rev 30352 | Rev 30372 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30352 Rev 30355
Line 32... Line 32...
32
		List<CheckOppoWarrantyTask> tasks = new ArrayList<>();
32
		List<CheckOppoWarrantyTask> tasks = new ArrayList<>();
33
		for (int i = 0; i < imeis.size() / bucketSize; i++) {
33
		for (int i = 0; i < imeis.size() / bucketSize; i++) {
34
			CheckOppoWarrantyTask task = new CheckOppoWarrantyTask(imeis);
34
			CheckOppoWarrantyTask task = new CheckOppoWarrantyTask(imeis);
35
			tasks.add(task);
35
			tasks.add(task);
36
		}
36
		}
-
 
37
		LOGGER.info("Total tasks {}", tasks.size());
37
		List<Future<Map<String, LocalDate>>> futures = excecutorService.invokeAll(tasks);
38
		List<Future<Map<String, LocalDate>>> futures = excecutorService.invokeAll(tasks);
38
		List<String> foundImeis = new ArrayList<>();
39
		List<String> foundImeis = new ArrayList<>();
39
		futures.stream().forEach(x -> {
40
		futures.stream().forEach(x -> {
40
			try {
41
			try {
41
				x.get().entrySet().forEach(y -> {
42
				x.get().entrySet().forEach(y -> {