diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2016-10-06 08:54:02 +0200 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2016-10-06 08:54:02 +0200 |
commit | fb6666efe7b6009528e98702efc66e9118011174 (patch) | |
tree | e7dd2b205552c1a756f7f8410fc11536162db9aa /lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java | |
parent | cf15cfe3593ec4c02cdb1121649bf95d19814e0c (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/MapResolversDumpExecutor.java')
-rwxr-xr-x | lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java index 7df537040..8f19e7084 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java @@ -17,17 +17,14 @@ package io.fd.honeycomb.lisp.translate.read.dump.executor; +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.LispMapResolverDetailsReplyDump; import io.fd.vpp.jvpp.core.dto.LispMapResolverDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; +import javax.annotation.Nonnull; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class MapResolversDumpExecutor extends AbstractJvppDumpExecutor @@ -38,14 +35,9 @@ public class MapResolversDumpExecutor extends AbstractJvppDumpExecutor } @Override - public LispMapResolverDetailsReplyDump executeDump(final Void params) throws DumpExecutionFailedException { - try { - return getReply(vppApi.lispMapResolverDump(new LispMapResolverDump()).toCompletableFuture()); - } catch (TimeoutException e) { - throw DumpTimeoutException - .wrapTimeoutException("Map resolver dump execution ended in timeout", e); - } catch (VppBaseCallException e) { - throw DumpCallFailedException.wrapFailedCallException("Map resolver dump execution failed", e); - } + @Nonnull + public LispMapResolverDetailsReplyDump executeDump(final InstanceIdentifier<?> identifier, final Void params) throws + ReadFailedException { + return getReplyForRead(vppApi.lispMapResolverDump(new LispMapResolverDump()).toCompletableFuture(), identifier); } } |