BUG-4808: Improve caching of effective attributes 50/35450/5
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:33:12 +0000 (10:33 +0000)
commit5d0d40aec50b865604bd419bbeb0930808207765
tree8d2ad5bd54416c04673c29b0cdb56510a5195279
parent1cc38735ca380f75153f291a695b0d28916553fb
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>
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