-public final class DOMNotificationRouter implements AutoCloseable, DOMNotificationPublishService,
- DOMNotificationService, DOMNotificationSubscriptionListenerRegistry {
-
- private static final Logger LOG = LoggerFactory.getLogger(DOMNotificationRouter.class);
- private static final ListenableFuture<Void> NO_LISTENERS = Futures.immediateFuture(null);
- private static final WaitStrategy DEFAULT_STRATEGY = PhasedBackoffWaitStrategy.withLock(1L, 30L, TimeUnit.MILLISECONDS);
- private static final EventHandler<DOMNotificationRouterEvent> DISPATCH_NOTIFICATIONS =
- (event, sequence, endOfBatch) -> event.deliverNotification();
- private static final EventHandler<DOMNotificationRouterEvent> NOTIFY_FUTURE =
- (event, sequence, endOfBatch) -> event.setFuture();
-
- private final Disruptor<DOMNotificationRouterEvent> disruptor;
- private final ExecutorService executor;
- private volatile Multimap<SchemaPath, ListenerRegistration<? extends DOMNotificationListener>> listeners = ImmutableMultimap.of();
- private final ListenerRegistry<DOMNotificationSubscriptionListener> subscriptionListeners = ListenerRegistry.create();
-
- @SuppressWarnings("unchecked")
- private DOMNotificationRouter(final ExecutorService executor, final int queueDepth, final WaitStrategy strategy) {
- this.executor = Preconditions.checkNotNull(executor);
-
- disruptor = new Disruptor<>(DOMNotificationRouterEvent.FACTORY, queueDepth, executor, ProducerType.MULTI, strategy);
- disruptor.handleEventsWith(DISPATCH_NOTIFICATIONS);
- disruptor.after(DISPATCH_NOTIFICATIONS).handleEventsWith(NOTIFY_FUTURE);
- disruptor.start();
+@Deprecated
+@SuppressFBWarnings(value = "NP_NONNULL_PARAM_VIOLATION", justification = "Void is the only allowed value")
+public final class DOMNotificationRouter extends LegacyDOMNotificationServiceAdapter implements AutoCloseable,
+ DOMNotificationPublishService, DOMNotificationSubscriptionListenerRegistry {
+
+ private final org.opendaylight.mdsal.dom.api.DOMNotificationPublishService delegateNotificationPublishService;
+ private final org.opendaylight.mdsal.dom.spi.DOMNotificationSubscriptionListenerRegistry delegateListenerRegistry;
+
+ private DOMNotificationRouter(
+ final org.opendaylight.mdsal.dom.api.DOMNotificationService delegateNotificationService,
+ final org.opendaylight.mdsal.dom.api.DOMNotificationPublishService delegateNotificationPublishService,
+ final org.opendaylight.mdsal.dom.spi.DOMNotificationSubscriptionListenerRegistry delegateListenerRegistry) {
+ super(delegateNotificationService);
+ this.delegateNotificationPublishService = delegateNotificationPublishService;
+ this.delegateListenerRegistry = delegateListenerRegistry;