diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2017-01-31 17:36:23 +0100 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-02-02 07:02:30 +0000 |
commit | 98464ee1f112e2dcf9ba142c92c2879e95b8855f (patch) | |
tree | 0d282eac1cecc1c32e275378f25465432000c1b4 /lisp/lisp2vpp/src/main | |
parent | ff239528a76a1af5d87693fc81a6f03724201b34 (diff) |
Fixed locator caching scope
must be cached per locator set
(same as ipv4 addresses under interfaces)
Change-Id: I1e2828a1ba4d4d20c99a995e281fe0b6726465fb
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/lisp2vpp/src/main')
-rwxr-xr-x | lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java index 202bf93a9..7baf92a2b 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java @@ -18,6 +18,7 @@ package io.fd.hc2vpp.lisp.translate.read; import com.google.common.base.Optional; +import com.google.common.collect.ImmutableSet; import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.LocatorDumpParams; @@ -30,6 +31,7 @@ import io.fd.honeycomb.translate.spi.read.Initialized; import io.fd.honeycomb.translate.spi.read.InitializingListReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; +import io.fd.honeycomb.translate.util.read.cache.TypeAwareIdentifierCacheKeyFactory; import io.fd.vpp.jvpp.core.dto.LispLocatorDetails; import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -71,7 +73,8 @@ public class InterfaceCustomizer this.dumpCacheManager = new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorDetailsReplyDump, LocatorDumpParams>() .withExecutor(createLocatorDumpExecutor(futureJvpp)) - .acceptOnly(LispLocatorDetailsReplyDump.class) + // must be cached per locator set + .withCacheKeyFactory(new TypeAwareIdentifierCacheKeyFactory(LispLocatorDetailsReplyDump.class, ImmutableSet.of(LocatorSet.class))) .build(); } |