summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-10-06 08:54:02 +0200
committerJan Srnicek <jsrnicek@cisco.com>2016-10-06 08:54:02 +0200
commitfb6666efe7b6009528e98702efc66e9118011174 (patch)
treee7dd2b205552c1a756f7f8410fc11536162db9aa /lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java
parentcf15cfe3593ec4c02cdb1121649bf95d19814e0c (diff)
HONEYCOMB-236 - Unified read/write exceptions
Change-Id: Idde761d0c0c2c4d96555ef94dbdaa87fad889493 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java')
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java25
1 files changed, 8 insertions, 17 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java
index 8e68c143a..778ce5308 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MappingsDumpExecutor.java
@@ -20,17 +20,14 @@ package io.fd.honeycomb.lisp.translate.read.dump.executor;
import static com.google.common.base.Preconditions.checkNotNull;
import io.fd.honeycomb.lisp.translate.read.dump.executor.params.MappingsDumpParams;
+import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor;
-import io.fd.honeycomb.translate.util.read.cache.exceptions.execution.DumpExecutionFailedException;
-import io.fd.honeycomb.translate.util.read.cache.exceptions.execution.i.DumpCallFailedException;
-import io.fd.honeycomb.translate.util.read.cache.exceptions.execution.i.DumpTimeoutException;
import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
-import java.util.concurrent.TimeoutException;
-import javax.annotation.Nonnull;
-import io.fd.vpp.jvpp.VppBaseCallException;
import io.fd.vpp.jvpp.core.dto.LispEidTableDetailsReplyDump;
import io.fd.vpp.jvpp.core.dto.LispEidTableDump;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
+import javax.annotation.Nonnull;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
@@ -45,8 +42,10 @@ public class MappingsDumpExecutor extends AbstractJvppDumpExecutor
@Override
- public LispEidTableDetailsReplyDump executeDump(final MappingsDumpParams params)
- throws DumpExecutionFailedException {
+ @Nonnull
+ public LispEidTableDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier,
+ final MappingsDumpParams params)
+ throws ReadFailedException {
checkNotNull(params, "Params for dump request not present");
LispEidTableDump request = new LispEidTableDump();
@@ -57,14 +56,6 @@ public class MappingsDumpExecutor extends AbstractJvppDumpExecutor
request.vni = params.getVni();
request.filter = params.getFilter();
- try {
- return getReply(vppApi.lispEidTableDump(request).toCompletableFuture());
- } catch (TimeoutException e) {
- throw DumpTimeoutException
- .wrapTimeoutException("Mappings dump execution timed out with params " + params.toString(), e);
- } catch (VppBaseCallException e) {
- throw DumpCallFailedException
- .wrapFailedCallException("Mappings dump execution failed with params " + params.toString(), e);
- }
+ return getReplyForRead(vppApi.lispEidTableDump(request).toCompletableFuture(), identifier);
}
}