From fd56a7403e572d9cf31b0e8623ada3ae4cf7e3cc Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 3 Nov 2016 08:25:47 +0100 Subject: 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 --- .../v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizer.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizer.java') 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() .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(); } -- cgit 1.2.3-korg