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%2FDOMNotificationPublishService.java;h=90aa87849e606013cdfe8660421e7c9efca77487;hp=3b6a88fe91de9c94a8d10554b021adafa620ebd0;hb=2a6aa1775604906755883f810ee9ea6d5f286135;hpb=7c1be1d20084ee053747d517d597f1a07df694bd diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationPublishService.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationPublishService.java index 3b6a88fe91..90aa87849e 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationPublishService.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMNotificationPublishService.java @@ -10,9 +10,7 @@ package org.opendaylight.controller.md.sal.dom.api; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import java.util.concurrent.TimeUnit; -import javax.annotation.Nonnegative; -import javax.annotation.Nonnull; -import org.opendaylight.controller.sal.core.api.BrokerService; +import org.eclipse.jdt.annotation.NonNull; /** * A {@link DOMService} which allows its user to send {@link DOMNotification}s. It @@ -23,8 +21,11 @@ import org.opendaylight.controller.sal.core.api.BrokerService; * - an offer-style method, which attempts to enqueue the notification, but allows * the caller to specify that it should never wait, or put an upper bound on how * long it is going to wait. + * + * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMNotificationPublishService} instead */ -public interface DOMNotificationPublishService extends DOMService, BrokerService { +@Deprecated(forRemoval = true) +public interface DOMNotificationPublishService extends DOMService { /** * Well-known value indicating that the implementation is currently not * able to accept a notification. @@ -78,7 +79,7 @@ public interface DOMNotificationPublishService extends DOMService, BrokerService * @throws InterruptedException if interrupted while waiting * @throws NullPointerException if notification is null. */ - @Nonnull ListenableFuture putNotification(@Nonnull DOMNotification notification) throws InterruptedException; + @NonNull ListenableFuture putNotification(@NonNull DOMNotification notification) throws InterruptedException; /** * Attempt to publish a notification. The result of this method is a {@link ListenableFuture} @@ -95,7 +96,7 @@ public interface DOMNotificationPublishService extends DOMService, BrokerService * the implementation from accepting the notification for delivery. * @throws NullPointerException if notification is null. */ - @Nonnull ListenableFuture offerNotification(@Nonnull DOMNotification notification); + @NonNull ListenableFuture offerNotification(@NonNull DOMNotification notification); /** * Attempt to publish a notification. The result of this method is a {@link ListenableFuture} @@ -106,7 +107,7 @@ public interface DOMNotificationPublishService extends DOMService, BrokerService * is guaranteed to block more than the specified timeout. * * @param notification Notification to be published. - * @param timeout how long to wait before giving up, in units of unit + * @param timeout how long to wait before giving up, in units of unit, must not be negative * @param unit a TimeUnit determining how to interpret the timeout parameter * @return A listenable future which will report completion when the service * has finished propagating the notification to its immediate registrants, @@ -116,6 +117,6 @@ public interface DOMNotificationPublishService extends DOMService, BrokerService * @throws NullPointerException if notification or unit is null. * @throws IllegalArgumentException if timeout is negative. */ - @Nonnull ListenableFuture offerNotification(@Nonnull DOMNotification notification, - @Nonnegative long timeout, @Nonnull TimeUnit unit) throws InterruptedException; + @NonNull ListenableFuture offerNotification(@NonNull DOMNotification notification, + long timeout, @NonNull TimeUnit unit) throws InterruptedException; }