diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2016-11-21 14:44:15 +0100 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2016-11-24 07:48:49 +0000 |
commit | 927fb75d969b2d39c91ae6735f0127646348b73c (patch) | |
tree | 9e7da10a07da0a5bf772be15909100405604ad40 /lisp/lisp2vpp/src | |
parent | f698c1ccc38646129ee4a15adacdf47942a24a52 (diff) |
HONEYCOMB-289 - Type-aware read customizers
Refactoring due to https://gerrit.fd.io/r/#/c/3898/
Change-Id: I3ddcc06aca0a730db9fd727a3d2b10cd085f870e
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/lisp2vpp/src')
10 files changed, 61 insertions, 50 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java index 710bb8d1c..a7167c3ef 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java @@ -20,6 +20,8 @@ package io.fd.hc2vpp.lisp.translate.read; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.base.Optional; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; +import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.hc2vpp.lisp.context.util.AdjacenciesMappingContext; import io.fd.hc2vpp.lisp.context.util.EidMappingContext; import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams; @@ -31,8 +33,6 @@ import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.vpp.jvpp.core.dto.LispAdjacenciesGet; import io.fd.vpp.jvpp.core.dto.LispAdjacenciesGetReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -70,6 +70,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer super(futureJvpp); dumpCacheManager = new DumpCacheManager.DumpCacheManagerBuilder<LispAdjacenciesGetReply, AdjacencyDumpParams>() .withExecutor(createExecutor()) + .acceptOnly(LispAdjacenciesGetReply.class) .build(); this.adjacenciesMappingContext = @@ -155,19 +156,32 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer }; } + private static final class AdjacencyDumpParams { + + private final int vni; + + AdjacencyDumpParams(final int vni) { + this.vni = vni; + } + + public int getVni() { + return this.vni; + } + } + private class EidPairProducer implements EidTranslator { private final EidMappingContext localMappingContext; private final EidMappingContext remoteMappingContext; - public EidPairProducer(final EidMappingContext localMappingContext, - final EidMappingContext remoteMappingContext) { + EidPairProducer(final EidMappingContext localMappingContext, + final EidMappingContext remoteMappingContext) { this.localMappingContext = checkNotNull(localMappingContext, "Local mapping context cannot be null"); this.remoteMappingContext = checkNotNull(remoteMappingContext, "Remote mapping context cannot be null"); } - public EidIdentificatorPair createPair(final LispAdjacency data, final int vni, - final MappingContext mappingContext) { + EidIdentificatorPair createPair(final LispAdjacency data, final int vni, + final MappingContext mappingContext) { return new EidIdentificatorPairBuilder() .setLocalEidId(new MappingId(localMappingContext.getId(getArrayAsEidLocal( MappingsDumpParams.EidType.valueOf(data.eidType), data.leid, vni), mappingContext))) @@ -176,17 +190,4 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer .build(); } } - - private static final class AdjacencyDumpParams { - - private final int vni; - - AdjacencyDumpParams(final int vni) { - this.vni = vni; - } - - public int getVni() { - return this.vni; - } - } } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java index 1e6ce3ab0..726d5eda0 100644 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/BridgeDomainSubtableCustomizer.java @@ -19,6 +19,8 @@ package io.fd.hc2vpp.lisp.translate.read; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.base.Optional; +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.SubtableDumpParams; import io.fd.hc2vpp.lisp.translate.read.trait.SubtableReader; import io.fd.honeycomb.translate.read.ReadContext; @@ -26,8 +28,6 @@ import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetails; import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetailsReplyDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -59,6 +59,7 @@ public class BridgeDomainSubtableCustomizer extends FutureJVppCustomizer impleme dumpManager = new DumpCacheManagerBuilder<LispEidTableMapDetailsReplyDump, SubtableDumpParams>() .withExecutor(createExecutor(futureJvppCore)) + .acceptOnly(LispEidTableMapDetailsReplyDump.class) .build(); this.bridgeDomainContext = checkNotNull(bridgeDomainContext, "Bridge domain context cannot be null"); } 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 c4bf0b865..0c6cc40d5 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 @@ -21,6 +21,8 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import com.google.common.base.Optional; +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; import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.LocatorDumpParams.LocatorDumpParamsBuilder; import io.fd.hc2vpp.lisp.translate.read.trait.LocatorReader; @@ -29,8 +31,6 @@ import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.vpp.jvpp.core.dto.LispLocatorDetails; import io.fd.vpp.jvpp.core.dto.LispLocatorDetailsReplyDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -67,6 +67,7 @@ public class InterfaceCustomizer this.dumpCacheManager = new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorDetailsReplyDump, LocatorDumpParams>() .withExecutor(createLocatorDumpExecutor(futureJvpp)) + .acceptOnly(LispLocatorDetailsReplyDump.class) .build(); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java index eb078fe68..654d1fc3d 100644 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/ItrRemoteLocatorSetCustomizer.java @@ -20,14 +20,14 @@ package io.fd.hc2vpp.lisp.translate.read; import static io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor.NO_PARAMS; import com.google.common.base.Optional; +import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; +import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.honeycomb.translate.read.ReadContext; import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder; -import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.vpp.jvpp.core.dto.LispGetMapRequestItrRlocs; import io.fd.vpp.jvpp.core.dto.LispGetMapRequestItrRlocsReply; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -51,6 +51,7 @@ public class ItrRemoteLocatorSetCustomizer extends FutureJVppCustomizer .withExecutor(((identifier, params) -> getReplyForRead( futureJVppCore.lispGetMapRequestItrRlocs(new LispGetMapRequestItrRlocs()).toCompletableFuture(), identifier))) + .acceptOnly(LispGetMapRequestItrRlocsReply.class) .build(); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java index 06d56c185..c6deb0209 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java @@ -24,6 +24,8 @@ import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDump import static io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams.QuantityType; import com.google.common.base.Optional; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; +import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.hc2vpp.lisp.context.util.EidMappingContext; import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.MappingsDumpParams; import io.fd.hc2vpp.lisp.translate.read.trait.MappingReader; @@ -33,8 +35,6 @@ import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.vpp.jvpp.core.dto.LispEidTableDetails; import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -78,6 +78,7 @@ public class LocalMappingCustomizer this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispEidTableDetailsReplyDump, MappingsDumpParams>() .withExecutor(createMappingDumpExecutor(futureJvpp)) + .acceptOnly(LispEidTableDetailsReplyDump.class) .build(); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java index 9b2ec5ac6..322022a7c 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java @@ -20,14 +20,14 @@ import static com.google.common.base.Preconditions.checkNotNull; import static io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor.NO_PARAMS; import com.google.common.base.Optional; +import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; +import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.hc2vpp.lisp.translate.read.trait.LocatorSetReader; import io.fd.honeycomb.translate.read.ReadContext; import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; -import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetails; import io.fd.vpp.jvpp.core.dto.LispLocatorSetDetailsReplyDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -60,6 +60,7 @@ public class LocatorSetCustomizer extends FutureJVppCustomizer this.locatorSetContext = checkNotNull(locatorSetContext, "Locator Set mapping context cannot be null"); this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorSetDetailsReplyDump, Void>() .withExecutor(createExecutor(futureJvpp)) + .acceptOnly(LispLocatorSetDetailsReplyDump.class) .build(); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java index cc73d7751..cf6ca8b83 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java @@ -19,14 +19,14 @@ package io.fd.hc2vpp.lisp.translate.read; import static io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor.NO_PARAMS; import com.google.common.base.Optional; +import io.fd.hc2vpp.common.translate.util.AddressTranslator; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; +import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.honeycomb.translate.read.ReadContext; import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; -import io.fd.hc2vpp.common.translate.util.AddressTranslator; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.vpp.jvpp.core.dto.LispMapResolverDetails; import io.fd.vpp.jvpp.core.dto.LispMapResolverDetailsReplyDump; import io.fd.vpp.jvpp.core.dto.LispMapResolverDump; @@ -61,6 +61,7 @@ public class MapResolverCustomizer extends FutureJVppCustomizer .withExecutor((identifier, params) -> getReplyForRead( futureJvpp.lispMapResolverDump(new LispMapResolverDump()).toCompletableFuture(), identifier)) + .acceptOnly(LispMapResolverDetailsReplyDump.class) .build(); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java index 2a36a2576..3b00d2800 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java @@ -25,6 +25,10 @@ import static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.l import com.google.common.base.Optional; import com.google.common.collect.ImmutableSet; +import io.fd.hc2vpp.common.translate.util.AddressTranslator; +import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; +import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.hc2vpp.lisp.context.util.EidMappingContext; import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.LocatorDumpParams; import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.LocatorDumpParams.LocatorDumpParamsBuilder; @@ -40,11 +44,7 @@ import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; 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.hc2vpp.common.translate.util.AddressTranslator; -import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.NamingContext; +import io.fd.honeycomb.translate.util.read.cache.TypeAwareIdentifierCacheKeyFactory; import io.fd.vpp.jvpp.core.dto.LispEidTableDetails; import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump; import io.fd.vpp.jvpp.core.dto.LispLocatorDetails; @@ -105,16 +105,25 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispEidTableDetailsReplyDump, MappingsDumpParams>() .withExecutor(createMappingDumpExecutor(futureJvpp)) + .acceptOnly(LispEidTableDetailsReplyDump.class) .build(); // cache key needs to have locator set scope to not mix with cached data this.locatorsDumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispLocatorDetailsReplyDump, LocatorDumpParams>() .withExecutor(createLocatorDumpExecutor(futureJvpp)) - .withCacheKeyFactory(new IdentifierCacheKeyFactory(ImmutableSet.of(LocatorSet.class))) + .withCacheKeyFactory(new TypeAwareIdentifierCacheKeyFactory(LispLocatorDetailsReplyDump.class, + ImmutableSet.of(LocatorSet.class))) + .acceptOnly(LispLocatorDetailsReplyDump.class) .build(); } + //compensate ~0 as default value of ttl + private static long resolveTtl(final int ttlValue) { + return ttlValue == -1 + ? Integer.MAX_VALUE + : ttlValue; + } @Override public RemoteMappingBuilder getBuilder(InstanceIdentifier<RemoteMapping> id) { @@ -175,13 +184,6 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer resolveMappings(id, builder, details, ctx.getModificationCache(), ctx.getMappingContext()); } - //compensate ~0 as default value of ttl - private static long resolveTtl(final int ttlValue) { - return ttlValue == -1 - ? Integer.MAX_VALUE - : ttlValue; - } - @Override public List<RemoteMappingKey> getAllIds(InstanceIdentifier<RemoteMapping> id, ReadContext context) throws ReadFailedException { diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java index c0680a7c6..e38ae026b 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java @@ -20,13 +20,13 @@ import static com.google.common.base.Preconditions.checkState; import static io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor.NO_PARAMS; import com.google.common.base.Optional; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; +import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.honeycomb.translate.read.ReadContext; import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ListReaderCustomizer; import io.fd.honeycomb.translate.util.RWUtils; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; -import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetails; import io.fd.vpp.jvpp.core.dto.LispEidTableVniDetailsReplyDump; import io.fd.vpp.jvpp.core.dto.LispEidTableVniDump; @@ -60,6 +60,7 @@ public class VniTableCustomizer extends FutureJVppCustomizer this.dumpManager = new DumpCacheManager.DumpCacheManagerBuilder<LispEidTableVniDetailsReplyDump, Void>() .withExecutor(((identifier, params) -> getReplyForRead( futureJvpp.lispEidTableVniDump(new LispEidTableVniDump()).toCompletableFuture(), identifier))) + .acceptOnly(LispEidTableVniDetailsReplyDump.class) .build(); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java index 0a73dc3f2..b092cb485 100644 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java @@ -19,6 +19,7 @@ package io.fd.hc2vpp.lisp.translate.read; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.base.Optional; +import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; import io.fd.hc2vpp.lisp.translate.read.dump.executor.params.SubtableDumpParams; import io.fd.hc2vpp.lisp.translate.read.trait.SubtableReader; import io.fd.honeycomb.translate.read.ReadContext; @@ -26,7 +27,6 @@ import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager; import io.fd.honeycomb.translate.util.read.cache.DumpCacheManager.DumpCacheManagerBuilder; -import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetails; import io.fd.vpp.jvpp.core.dto.LispEidTableMapDetailsReplyDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; @@ -54,6 +54,7 @@ public class VrfSubtableCustomizer extends FutureJVppCustomizer super(futureJvpp); dumpManager = new DumpCacheManagerBuilder<LispEidTableMapDetailsReplyDump, SubtableDumpParams>() .withExecutor(createExecutor(futureJvpp)) + .acceptOnly(LispEidTableMapDetailsReplyDump.class) .build(); } |