From: Robert Varga Date: Wed, 7 Oct 2020 22:16:51 +0000 (+0200) Subject: Hide LazySerializedDOMNotification X-Git-Tag: v7.0.0~7 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=5dc1d8ca9e617ce28f2858b1d54635f12627af12;p=mdsal.git Hide LazySerializedDOMNotification LazySerializedDOMNotification is an implementation detail that is not needed outside of the adapter. Change-Id: I73de104040e4a014f1ec24bbb302ebca1004df55 Signed-off-by: Robert Varga --- diff --git a/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/LazySerializedDOMNotification.java b/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/LazySerializedDOMNotification.java index 847e0eb6ce..84835579a4 100644 --- a/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/LazySerializedDOMNotification.java +++ b/binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/LazySerializedDOMNotification.java @@ -29,18 +29,19 @@ import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absol * This implementation performs serialization of data, only if receiver of notification actually accessed data from * notification. */ -public final class LazySerializedDOMNotification implements DOMNotification, DOMEvent { +final class LazySerializedDOMNotification implements DOMNotification, DOMEvent { private static final LoadingCache, Absolute> PATHS = CacheBuilder.newBuilder().weakKeys() - .build(new CacheLoader, Absolute>() { - @Override - public Absolute load(final Class key) { - // TODO: for nested (YANG 1.1) notifications we will need the SchemaNodeIdentifier where the - // notification is being invoked and use that instead of ROOT. How Binding users will refer to - // it is TBD (but probably InstanceIdentifier, which means we will need to do some lifting to - // find the SchemaNodeIdentifier) - return Absolute.of(BindingReflections.findQName(key)).intern(); - } - }); + .build(new CacheLoader, Absolute>() { + @Override + public Absolute load(final Class key) { + // TODO: for nested (YANG 1.1) notifications we will need the SchemaNodeIdentifier where the + // notification is being invoked and use that instead of ROOT. How Binding users will refer to + // it is TBD (but probably InstanceIdentifier, which means we will need to do some lifting to + // find the SchemaNodeIdentifier), as we will need to deal with the same multiplicies we need + // for data due to grouping-based reuse. + return Absolute.of(BindingReflections.findQName(key)).intern(); + } + }); private final @NonNull BindingNormalizedNodeSerializer codec; private final @NonNull Notification data; @@ -82,7 +83,7 @@ public final class LazySerializedDOMNotification implements DOMNotification, DOM return eventInstant; } - public @NonNull Notification getBindingData() { + @NonNull Notification getBindingData() { return data; } }