Speed up time computation 77/83177/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 19 Jul 2019 13:52:48 +0000 (15:52 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 19 Jul 2019 13:54:04 +0000 (15:54 +0200)
commit5775a340766e8e5b8f13034c8b3decfcee3d8861
tree473238b71aab62a3745c4ccdd8b4dd752a76eb75
parentd6634716a6cd3d5b91b50f2c496b97d8e05a94ad
Speed up time computation

When we are adding or refreshing a mapping, we can first access
the existing timestamp and only fallback to System.currentTimeMillis()
if it's not present.

This also simplifies things, as we end up reading the timestamp
(a synchronized operation) only once.

Change-Id: I39bfe212e7c746e66dc144ad1e036a2b02544c6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/timebucket/implementation/TimeBucketMappingTimeoutService.java