summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-11-03 08:25:47 +0100
committerMaros Marsalek <mmarsale@cisco.com>2016-11-03 10:51:24 +0000
commit76a0b6df0c27eade87f9c04346ef2b5aee5eedff (patch)
treeb998bdae6a38ba8166eff7a66b534ab327a6967f /v3po/v3po2vpp/src/main/java/io
parent918847c2202e943ca8e3e8c1ff1b8d3617cb502d (diff)
HONEYCOMB-285 - Cache scope for sub-interface addresses
Same as for interface addresses, these addresses must have caching scope of their parent sub-interface Change-Id: I31a8d123e02a99e592181c198f69a34b0be910e5 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizer.java
index a445c3f55..e18de5581 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizer.java
@@ -19,12 +19,14 @@ package io.fd.honeycomb.translate.v3po.interfacesstate.ip;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableSet;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
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.IdentifierCacheKeyFactory;
import io.fd.honeycomb.translate.v3po.interfacesstate.SubInterfaceCustomizer;
import io.fd.honeycomb.translate.v3po.interfacesstate.ip.dump.params.AddressDumpParams;
import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
@@ -66,6 +68,8 @@ public class SubInterfaceIpv4AddressCustomizer extends FutureJVppCustomizer
this.interfaceContext = checkNotNull(interfaceContext, "interfaceContext should not be null");
this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<IpAddressDetailsReplyDump, AddressDumpParams>()
.withExecutor(createExecutor(futureJVppCore))
+ //same as with ipv4 addresses for interfaces, these must have cache scope of their parent sub-interface
+ .withCacheKeyFactory(new IdentifierCacheKeyFactory(ImmutableSet.of(SubInterface.class)))
.build();
}