com.github.thorbenkuck.keller.event.NativeAsynchronousDispatcherStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of keller-events Show documentation
Show all versions of keller-events Show documentation
Keller is a universal base-package
The newest version!
package com.github.thorbenkuck.keller.event;
import com.github.thorbenkuck.keller.utility.Keller;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.stream.Collectors;
final class NativeAsynchronousDispatcherStrategy implements DispatcherStrategy {
private final EventBus eventBus;
private final ExecutorService threadPool;
NativeAsynchronousDispatcherStrategy(EventBus eventBus, ExecutorService threadPool) {
this.eventBus = eventBus;
this.threadPool = threadPool;
}
private void dispatchAsynchronous(final List list, final Object event) {
if(list.isEmpty()) {
return;
}
threadPool.execute(() -> {
final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy