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
commitfd56a7403e572d9cf31b0e8623ada3ae4cf7e3cc (patch)
treebf619b9368ab45800d80b22d11d9b17cb8d14ef8 /v3po/v3po2vpp/src/main/java/io
parent03c9a24ebf7bee3ae767236b1fd3ae0ce8fccec6 (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();
}