BUG-4808: Improve caching of effective attributes 82/44782/1
authorOm Prakash <op317q@att.com>
Tue, 16 Aug 2016 13:24:54 +0000 (09:24 -0400)
committerMilos Fabian <milfabia@cisco.com>
Mon, 29 Aug 2016 10:34:09 +0000 (10:34 +0000)
commit13a9955cd9a67b8b0ed1e051cabb7ba534a1ceea
tree580f296eea94ee109c5c5e69a537ee0c4400f070
parentfbd65efd368012847e0f87a98a8753de6ce0a3c8
BUG-4808: Improve caching of effective attributes

Instead of reusing effective attributes for a particular update, maintain a cache for the duration of peer's role.
This way attributes are cached across multiple messages, maintaining memory efficiency in face of fragmented updates.
The cache maintains weak references only, hence does not prevent garbage collection of stale entries.

Change-Id: I625d2b129814772030ff478b4ec99b71e9b98d37
Signed-off-by: Om Prakash <op317q@att.com>
(cherry picked from commit 5d0d40aec50b865604bd419bbeb0930808207765)
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/CachingImportPolicy.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/ImportPolicyPeerTrackerImpl.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/PolicyDatabase.java