- notificationManager = new QueuedNotificationManager<>(listenerExecutor, MANAGER_INVOKER, maxQueueSize, "DataTreeChangeListenerQueueMgr");
+ notificationManager = QueuedNotificationManager.create(listenerExecutor, (listener, notifications) -> {
+ // FIXME: we are not checking for listener being closed
+ listener.getInstance().onDataTreeChanged(notifications);
+ }, maxQueueSize,
+ "DataTreeChangeListenerQueueMgr");
+ }
+
+ private InMemoryDOMStoreTreeChangePublisher(final QueuedNotificationManager<
+ AbstractDOMDataTreeChangeListenerRegistration<?>, DataTreeCandidate> notificationManager) {
+ this.notificationManager = notificationManager;
+ }
+
+ QueuedNotificationManager<AbstractDOMDataTreeChangeListenerRegistration<?>, DataTreeCandidate>
+ getNotificationManager() {
+ return notificationManager;