-public final class DOMNotificationRouter implements AutoCloseable, DOMNotificationPublishService, DOMNotificationService {
- private static final ListenableFuture<Void> NO_LISTENERS = Futures.immediateFuture(null);
- private static final WaitStrategy DEFAULT_STRATEGY = new SleepingWaitStrategy();
- private static final EventHandler<DOMNotificationRouterEvent> DISPATCH_NOTIFICATIONS = new EventHandler<DOMNotificationRouterEvent>() {
- @Override
- public void onEvent(final DOMNotificationRouterEvent event, final long sequence, final boolean endOfBatch) throws Exception {
- event.deliverNotification();
-
- }
- };
- private static final EventHandler<DOMNotificationRouterEvent> NOTIFY_FUTURE = new EventHandler<DOMNotificationRouterEvent>() {
- @Override
- public void onEvent(final DOMNotificationRouterEvent event, final long sequence, final boolean endOfBatch) {
- event.setFuture();
- }
- };
-
- private final Disruptor<DOMNotificationRouterEvent> disruptor;
- private final ExecutorService executor;
- private volatile Multimap<SchemaPath, ListenerRegistration<? extends DOMNotificationListener>> listeners = ImmutableMultimap.of();
-
- private DOMNotificationRouter(final ExecutorService executor, final Disruptor<DOMNotificationRouterEvent> disruptor) {
- this.executor = Preconditions.checkNotNull(executor);
- this.disruptor = Preconditions.checkNotNull(disruptor);
+@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;