This configuration requires that all your tasks you submit to the system implement
the Groupable interface.  By default, it will round robin tasks from each group

Tasks will be tracked internally in the system by randomly generated UUIDs

@return
341582
public static <GROUP extends Serializable> ExecutorConfig<GROUP> basicGroupable() {
        return new ExecutorConfig<GROUP>()
                    .withTaskIdAdapter((TaskIdAdapter<Groupable<GROUP>, GROUP, ?>) new DefaultGroupableTaskIdAdapter<GROUP>());
    }
1068518
public ExtendedRegisterableItemsFactory build() {
        return new NoopExtendedRegisterableItemsFactory() {
            private RuntimeEngine _runtime;
            private List<EventListener> _listeners = new ArrayList<EventListener>();

            private synchronized List<EventListener> listeners(RuntimeEngine runtime) {
                if (_runtime != runtime) {
                    _runtime = runtime;
                    _listeners.clear();
                    KieRuntimeEventManager runtimeEventManager = _runtime.getKieSession();
                    for (ListenerBuilder builder : _listenerBuilders) {
                        EventListener listener = builder.build(runtimeEventManager);
                        if (listener != null && !builder.wasAutomaticRegistration()) {
                            _listeners.add(listener);
                        }
                    }
                }
                return new ArrayList<EventListener>(_listeners);
            }

            @Override
            public List<AgendaEventListener> getAgendaEventListeners(RuntimeEngine runtime) {
                List<AgendaEventListener> list = new ArrayList<AgendaEventListener>();
                for (EventListener listener : listeners(runtime)) {
                    if (listener instanceof AgendaEventListener) {
                        list.add((AgendaEventListener)listener);
                    }
                }
                return list;
            }

            @Override
            public List<ProcessEventListener> getProcessEventListeners(RuntimeEngine runtime) {
                List<ProcessEventListener> list = new ArrayList<ProcessEventListener>();
                if (_bpm) {
                    // always add our EventPublisherProcessEventListener for bpm component
                    list.add(new EventPublisherProcessEventListener(getServiceDomain().getEventPublisher()));
                }
                for (EventListener listener : listeners(runtime)) {
                    if (listener instanceof ProcessEventListener) {
                        list.add((ProcessEventListener)listener);
                    }
                }
                return list;
            }

            @Override
            public List<RuleRuntimeEventListener> getRuleRuntimeEventListeners(RuntimeEngine runtime) {
                List<RuleRuntimeEventListener> list = new ArrayList<RuleRuntimeEventListener>();
                for (EventListener listener : listeners(runtime)) {
                    if (listener instanceof RuleRuntimeEventListener) {
                        list.add((RuleRuntimeEventListener)listener);
                    }
                }
                return list;
            }

            @Override
            public Map<String, WorkItemHandler> getWorkItemHandlers(RuntimeEngine runtime) {
                Map<String, WorkItemHandler> map = new LinkedHashMap<String, WorkItemHandler>();
                // wih builder list will always be empty for rules component
                for (WorkItemHandlerBuilder builder : _workItemHandlerBuilders) {
                    ProcessRuntime processRuntime = runtime.getKieSession();
                    RuntimeManager runtimeManager = null;
                    if (runtime instanceof RuntimeEngineImpl) {
                        runtimeManager = ((RuntimeEngineImpl)runtime).getManager();
                    }
                    String name = builder.getWorkItemHandlerName();
                    WorkItemHandler handler = builder.build(processRuntime, runtimeManager);
                    map.put(name, handler);
                }
                return map;
            }

            @Override
            public List<KieBaseEventListener> getKieBaseEventListeners(RuntimeEngine runtime) {
                List<KieBaseEventListener> list = new ArrayList<KieBaseEventListener>();
                for (EventListener listener : listeners(runtime)) {
                    if (listener instanceof KieBaseEventListener) {
                        list.add((KieBaseEventListener)listener);
                    }
                }
                return list;
            }
        };
    }
530039
public synchronized Map<String, List<Integer>> getList() {
    final Map<String, List<Integer>> tasks = new LinkedHashMap<>();

    tasks.put("Running", getTaskIdList(runningTasks));
    tasks.put("Waiting", getTaskIdList(taskQueue));
    tasks.put("Finished", getTaskIdList(finishedTasks));
    tasks.put("Canceled", getTaskIdList(canceledTasks));

    return tasks;
  }
1161853
public Consumer<AppendGroupsOp> asAppendGroupsConsumer() {
        return new Consumer<AppendGroupsOp>() {
            @Override
            public void accept(AppendGroupsOp op) throws Exception {
                appendBatchWith(op.getArg1());
            }
        };
    }
1058563
public CreateClusterRequest withInstanceGroup(InstanceGroupConfig instanceGroup) {
        if (this.instanceGroups == null) {
            this.instanceGroups = new ArrayList<InstanceGroupConfig>();
        }
        this.instanceGroups.add(instanceGroup);
        return this;
    }
1293571
public JobSubmission instantiateForInsert() {
		JobSubmission entity = new JobSubmission();
		entity.setIsDeleted(Boolean.FALSE);
		entity.setStatus("Submitted");
		entity.setCandidate(new Candidate(1));
		entity.setJobOrder(new JobOrder(1));
		return entity;
	}
432966
public Set<String> getNeverGroupedIds() {
        String s = props.getProperty("neverGroupedIds");
        if(s == null) return Collections.emptySet();
        
        Set<String> res = new HashSet<String>();
        String[] parts = s.split("[,]");
        for(String part : parts) {
            res.add(part);
        }
        return res;
    }
720449
public FileDownloadQueueSet downloadSequentially(List<BaseDownloadTask> tasks) {
        this.isSerial = true;
        this.tasks = new BaseDownloadTask[tasks.size()];
        tasks.toArray(this.tasks);

        return this;
    }
1374449
protected OptionalThing<RunnerResult> synchronizedNeighborPreparing(Iterator<NeighborConcurrentGroup> groupIte,
            Supplier<OptionalThing<RunnerResult>> runner) { // in preparing lock
        if (groupIte.hasNext()) {
            final NeighborConcurrentGroup group = groupIte.next();
            synchronized (group.getGroupPreparingLock()) {
                return synchronizedNeighborPreparing(groupIte, runner);
            }
        } else {
            return runner.get();
        }
    }
491237
public List<Integer> grouper(List<Object> values) {
        if (GrouperType.global.equals(groupType)) {
            // send to task which taskId is 0
            return JStormUtils.mk_list(outTasks.get(0));
        } else if (GrouperType.fields.equals(groupType)) {
            // field grouping
            return fieldsGrouper.grouper(values);
        } else if (GrouperType.all.equals(groupType)) {
            // send to every task
            return outTasks;
        } else if (GrouperType.shuffle.equals(groupType)) {
            // random, but the random is different from none
            return shuffer.grouper(values);
        } else if (GrouperType.none.equals(groupType)) {
            int rnd = Math.abs(random.nextInt() % outTasks.size());
            return JStormUtils.mk_list(outTasks.get(rnd));
        } else if (GrouperType.custom_obj.equals(groupType)) {
            return customGrouper.grouper(values);
        } else if (GrouperType.custom_serialized.equals(groupType)) {
            return customGrouper.grouper(values);
        } else {
            LOG.warn("Unsupported group type");
        }

        return new ArrayList<>();
    }
504541
private OperationFuture<Group> createServers(GroupHierarchyConfig config, String rootGroupId) {
        List<CreateServerConfig> configs = config.getServerConfigs();

        List<JobFuture> futures = configs.stream()
            .map(serverConfig -> serverService().create(serverConfig).jobFuture())
            .collect(toList());

        return new OperationFuture<>(Group.refById(rootGroupId), new ParallelJobsFuture(futures));
    }
566744
public ThreadGroup getSchedulerThreadGroup() {

    if (threadGroup == null) {
      threadGroup = new ThreadGroup("QuartzScheduler");
      if (quartzSchedulerResources.getMakeSchedulerThreadDaemon()) {
        threadGroup.setDaemon(true);
      }
    }

    return threadGroup;
  }
454841
public <T extends ThreadPoolTaskScheduler> T configure(T taskScheduler) {
		PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
		map.from(this.poolSize).to(taskScheduler::setPoolSize);
		map.from(this.awaitTermination)
				.to(taskScheduler::setWaitForTasksToCompleteOnShutdown);
		map.from(this.awaitTerminationPeriod).asInt(Duration::getSeconds)
				.to(taskScheduler::setAwaitTerminationSeconds);
		map.from(this.threadNamePrefix).to(taskScheduler::setThreadNamePrefix);
		if (!CollectionUtils.isEmpty(this.customizers)) {
			this.customizers.forEach((customizer) -> customizer.customize(taskScheduler));
		}
		return taskScheduler;
	}
696564
public static UUID fastUUID() {
		ThreadLocalRandom random = ThreadLocalRandom.current();
		return new UUID(random.nextLong(), random.nextLong());
	}
1106213
public long newId() {
        for (; ; ) {
            Block block = this.block;
            long res = block.next();
            if (res != Long.MIN_VALUE) {
                return res;
            }

            synchronized (this) {
                if (block != this.block) {
                    // new block was assigned in the meantime
                    continue;
                }
                this.block = new Block(batchIdSupplier.newIdBatch(batchSize), validity);
            }
        }
    }
515580
public Launch synchLaunch() throws LaunchException {
		JobDataMap jobDataMap = new JobDataMap();
		jobDataMap.put(Launch.PARAMETERS, this.launch.getParameters());
		jobDataMap.put(Launch.DEFAULT_EXECUTOR_KEY, this.launch.getExecutorService());
		try {
			this.launch.synchLaunch();
		} catch (org.parallelj.launching.LaunchException e) {
			throw new LaunchException(e);
		}
		
		org.parallelj.launching.LaunchResult result = this.launch.getLaunchResult();
		jobDataMap.put(QuartzUtils.RETURN_CODE, result.getStatusCode());
		jobDataMap.put(QuartzUtils.USER_RETURN_CODE, result.getReturnCode());
		jobDataMap.put(QuartzUtils.PROCEDURES_IN_ERROR, result.getProceduresInError());
		jobDataMap.put(Launch.OUTPUTS, this.launch.getLaunchResult().getOutputParameters());
		this.legacyLaunchResult = new LaunchResult(launch.getLaunchId(), jobDataMap);
		
		return this;
	}
857271
public java.util.List<ScheduledUpdateGroupAction> getScheduledUpdateGroupActions() {
        if (scheduledUpdateGroupActions == null) {
            scheduledUpdateGroupActions = new com.amazonaws.internal.SdkInternalList<ScheduledUpdateGroupAction>();
        }
        return scheduledUpdateGroupActions;
    }