Split STATIC_CODECS into per-type caches 32/100532/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 11 Apr 2022 13:57:28 +0000 (15:57 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 11 Apr 2022 14:00:35 +0000 (16:00 +0200)
commit1a2d7e719b78cd564fe37578cab270372628d096
treef6b5186df77ef1e83968eba8629e818559fc5230
parent984dfcd854a006724cbf0b20efc8bac6094bad48
Split STATIC_CODECS into per-type caches

We have a rather sorry tangle of call sites due to the fact we one
instance of a cache with multiple loaders. Split the cache up separately
for each type, co-locating the cache and the loader. This makes it a tad
clearer as to what the type hierarchy looks like: ValueTypeCodec really
is just a useless holder.

JIRA: MDSAL-704
Change-Id: Ia334d373090a119297e7b9c92bccb166e80bcac6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/BitsCodec.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/EncapsulatedValueCodec.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/EnumerationCodec.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/ValueTypeCodec.java
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/mdsal/binding/dom/codec/impl/EnumerationCodecTest.java