X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2FRpcBroker.java;h=964a12bcf84d10a243c57145a14c347239bff887;hp=9f3fed4fd5139a9e792b0855aec234233d38720c;hb=9ddc65e1ddae50f691566cd9382707679436c055;hpb=a58c23b491f665e6d5449e97d430a7e15d1ecda6 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcBroker.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcBroker.java index 9f3fed4fd5..964a12bcf8 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcBroker.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcBroker.java @@ -29,16 +29,12 @@ import org.opendaylight.yangtools.yang.common.RpcError.ErrorType; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.model.api.SchemaPath; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Actor to initiate execution of remote RPC on other nodes of the cluster. */ public class RpcBroker extends AbstractUntypedActor { - - private static final Logger LOG = LoggerFactory.getLogger(RpcBroker.class); private final DOMRpcService rpcService; private RpcBroker(final DOMRpcService rpcService) { @@ -57,6 +53,7 @@ public class RpcBroker extends AbstractUntypedActor { } } + @SuppressWarnings("checkstyle:IllegalCatch") private void executeRpc(final ExecuteRpc msg) { LOG.debug("Executing rpc {}", msg.getRpc()); final NormalizedNode input = RemoteRpcInput.from(msg.getInputNormalizedNode()); @@ -86,16 +83,17 @@ public class RpcBroker extends AbstractUntypedActor { } @Override - public void onFailure(final Throwable t) { - LOG.error("executeRpc for {} failed with root cause: {}. For exception details, enable Debug logging.", - msg.getRpc(), Throwables.getRootCause(t)); - if(LOG.isDebugEnabled()) { - LOG.debug("Detailed exception for execute RPC failure :{}", t); + public void onFailure(final Throwable failure) { + LOG.error( + "executeRpc for {} failed with root cause: {}. For exception details, enable Debug logging.", + msg.getRpc(), Throwables.getRootCause(failure)); + if (LOG.isDebugEnabled()) { + LOG.debug("Detailed exception for execute RPC failure :{}", failure); } - sender.tell(new akka.actor.Status.Failure(t), self); + sender.tell(new akka.actor.Status.Failure(failure), self); } }); - } catch (final Exception e) { + } catch (final RuntimeException e) { sender.tell(new akka.actor.Status.Failure(e), sender); } }