Separate out single-key Identifiable handling 10/78110/13
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 25 Nov 2018 15:01:34 +0000 (16:01 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 27 Nov 2018 12:46:48 +0000 (12:46 +0000)
commit581410c9bc93c396631b8a09be0df7bc3faf03d3
tree7317a5cbf482c071a6bc6660bc3125b9efa8cb4d
parent4192aa09a4842abe45bf1034a49c50a47d04c76b
Separate out single-key Identifiable handling

We can further optimize IdentifiableItemCodec by separating
out the common case of a single-key from multiple-keys.

This allows us to specialize ImmutableMapTemplates we use for
the two cases, more efficiently binding to
NodeIdentifierWithPredicates constructor.

Furthermore we can specialize key constructor invocation such
that we directly invoke the constructor for single-key identifiers,
without the need to iterate and allocate arrays.

JIRA: MDSAL-387
Change-Id: I2fc26dc7285bfb3fe829b8b0efd9937daf6fbc8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/BindingCodecContext.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/IdentifiableItemCodec.java