X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fapi%2FDOMRpcImplementation.java;h=46032a3182ef1c2de7e9c1f35b58101de3937962;hp=c246c762704ede47bc227ff91bb9038b8f1eb3df;hb=3ec97cd0a86ad1b79f6854dc6924eb7b06e359a3;hpb=bfd413d87f82ee3ffed67a141a980805950a0f06 diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcImplementation.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcImplementation.java index c246c76270..46032a3182 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcImplementation.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcImplementation.java @@ -8,14 +8,17 @@ package org.opendaylight.controller.md.sal.dom.api; import com.google.common.util.concurrent.CheckedFuture; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; /** * Interface implemented by an individual RPC implementation. This API allows for dispatch * implementations, e.g. an individual object handling a multitude of RPCs. + * + * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMRpcImplementation} instead. */ +@Deprecated public interface DOMRpcImplementation { /** * Initiate invocation of the RPC. Implementations of this method are @@ -27,5 +30,15 @@ public interface DOMRpcImplementation { * or report a subclass of {@link DOMRpcException} reporting a transport * error. */ - @Nonnull CheckedFuture invokeRpc(@Nonnull DOMRpcIdentifier rpc, @Nullable NormalizedNode input); + @NonNull CheckedFuture invokeRpc(@NonNull DOMRpcIdentifier rpc, + @Nullable NormalizedNode input); + + /** + * Return the relative invocation cost of this implementation. Default implementation return 0. + * + * @return Non-negative cost of invoking this implementation. + */ + default long invocationCost() { + return 0; + } }