Use ImmutableSet/Map in ServiceReferenceRegistry 39/12839/3
authorRobert Varga <rovarga@cisco.com>
Fri, 14 Nov 2014 11:13:40 +0000 (12:13 +0100)
committerRobert Varga <rovarga@cisco.com>
Wed, 19 Nov 2014 10:32:14 +0000 (10:32 +0000)
commitde384747d3e814e9157436bfd9fe87db7494efbd
tree8cab58017e6ee96e4cc6f052b6086eb8e68dc7c2
parentdf4aabedd8d9a63da661845c70042102f36a14b5
Use ImmutableSet/Map in ServiceReferenceRegistry

Rather than wrapping collections in unmodifiable references, perform a
copy to obtain a properly-constant collection. These references are
usually retained for longer time, so opting for memory efficiency is
better than using sparse collections.

Change-Id: I708beaaa9abb13560297a7eb1369322220e87d5a
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ServiceReferenceRegistryImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/util/InterfacesHelper.java