Disconnect NetconfNotificationCollector registration 75/105675/5
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 25 Apr 2023 18:42:49 +0000 (20:42 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 25 Apr 2023 22:02:19 +0000 (00:02 +0200)
commitb7bfdb6fd6f7df903c04fc84da09340e0807e8ba
treefefa5fcffc108670c9f5d1e08573f0dfddf9905b
parent1ad7ad47f032df11ca7b88ded7e2fd3e29eeae0c
Disconnect NetconfNotificationCollector registration

NotificationRegistration does is actually the same thing as
Registration, except it does not enforce idempotence. Replace its use in
NetconfNotificationCollector with Registration and use an explicit
AbstractObjectRegistration subclass.

This fixes potential problems with multiple (un)registrations of the
same object and opens up the possibility for future removal of locking,
as AbstractObjectRegistration knows whether it is closed or not.

Change-Id: I1ed8e1f74ee755d344815c511499a8dbfc9cce8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationManager.java
netconf/mdsal-netconf-notification/src/main/java/org/opendaylight/netconf/mdsal/notification/impl/NotificationToMdsalWriter.java
netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/NotificationToMdsalWriterTest.java
netconf/netconf-notifications-api/src/main/java/org/opendaylight/netconf/notifications/NetconfNotificationCollector.java