import com.lmax.disruptor.WaitStrategy;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
* {@link #offerNotification(DOMNotification, long, TimeUnit)}
* is realized by arming a background wakeup interrupt.
*/
+@SuppressFBWarnings(value = "NP_NONNULL_PARAM_VIOLATION", justification = "Void is the only allowed value")
public final class DOMNotificationRouter implements AutoCloseable, DOMNotificationPublishService,
DOMNotificationService, DOMNotificationSubscriptionListenerRegistry {
private void notifyListenerTypesChanged(final Set<SchemaPath> typesAfter) {
final List<ListenerRegistration<DOMNotificationSubscriptionListener>> listenersAfter = ImmutableList
.copyOf(subscriptionListeners.getListeners());
- executor.submit(() -> {
+ executor.execute(() -> {
for (final ListenerRegistration<DOMNotificationSubscriptionListener> subListener : listenersAfter) {
try {
subListener.getInstance().onSubscriptionChanged(typesAfter);
public <L extends DOMNotificationSubscriptionListener> ListenerRegistration<L> registerSubscriptionListener(
final L listener) {
final Set<SchemaPath> initialTypes = listeners.keySet();
- executor.submit(() -> listener.onSubscriptionChanged(initialTypes));
+ executor.execute(() -> listener.onSubscriptionChanged(initialTypes));
return subscriptionListeners.registerWithType(listener);
}