我正在尝试每分钟执行一个电子邮件作业。作业有5个服务。每5个服务应该并行运行。
使用ExecutorService:
ExecutorService service = null;
if (serviceMap != null && serviceMap.size() > 0) {
for (;;) {
service = Executors.newFixedThreadPool(serviceMap.size()); // Here Service Map size will be 5
for (Map.Entry entry