@SuppressWarnings("unchecked") @Override public <T extends EventProcessor> Optional<T> eventProcessorByProcessingGroup(String processingGroup) { ensureInitialized(); return Optional.ofNullable((T) eventProcessors().get(processorNameForProcessingGroup(processingGroup))); }
private void registerSagaManagers(Map<String, List<Function<Configuration, EventHandlerInvoker>>> handlerInvokers) { sagaConfigurations.forEach(sc -> { SagaConfiguration<?> sagaConfig = sc.initialize(configuration); String processingGroup = selectProcessingGroupByType(sagaConfig.type()); String processorName = processorNameForProcessingGroup(processingGroup); handlerInvokers.computeIfAbsent(processorName, k -> new ArrayList<>()) .add(c -> sagaConfig.manager()); }); }
}); assignments.forEach((processingGroup, handlers) -> { String processorName = processorNameForProcessingGroup(processingGroup); handlerInvokers.computeIfAbsent(processorName, k -> new ArrayList<>()).add( c -> SimpleEventHandlerInvoker.builder()
@SuppressWarnings("unchecked") @Override public <T extends EventProcessor> Optional<T> eventProcessorByProcessingGroup(String processingGroup) { ensureInitialized(); return Optional.ofNullable((T) eventProcessors().get(processorNameForProcessingGroup(processingGroup))); }
private void registerSagaManagers(Map<String, List<Function<Configuration, EventHandlerInvoker>>> handlerInvokers) { sagaConfigurations.forEach(sc -> { SagaConfiguration<?> sagaConfig = sc.initialize(configuration); String processingGroup = selectProcessingGroupByType(sagaConfig.type()); String processorName = processorNameForProcessingGroup(processingGroup); handlerInvokers.computeIfAbsent(processorName, k -> new ArrayList<>()) .add(c -> sagaConfig.manager()); }); }
}); assignments.forEach((processingGroup, handlers) -> { String processorName = processorNameForProcessingGroup(processingGroup); handlerInvokers.computeIfAbsent(processorName, k -> new ArrayList<>()).add( c -> SimpleEventHandlerInvoker.builder()