Migrate mdsal-dom-api to JDT annotations
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMNotificationPublishService.java
index a55edb3db40d0a9d2af30a465c0e59f71f301cd4..f4d76593af826ac309a1d7eda4c346cf225a320f 100644 (file)
@@ -7,11 +7,11 @@
  */
 package org.opendaylight.mdsal.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.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yangtools.util.concurrent.FluentFutures;
 
 /**
  * A {@link DOMService} which allows its user to send {@link DOMNotification}s. It
@@ -28,7 +28,7 @@ public interface DOMNotificationPublishService extends DOMService {
      * Well-known value indicating that the implementation is currently not
      * able to accept a notification.
      */
-    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(
+    ListenableFuture<Object> REJECTED = FluentFutures.immediateFailedFluentFuture(
         new DOMNotificationRejectedException("Unacceptable blocking conditions encountered"));
 
     /**
@@ -61,7 +61,7 @@ public interface DOMNotificationPublishService extends DOMService {
      * @throws InterruptedException if interrupted while waiting
      * @throws NullPointerException if notification is null.
      */
-    @Nonnull ListenableFuture<? extends Object> putNotification(@Nonnull DOMNotification notification)
+    @NonNull ListenableFuture<? extends Object> putNotification(@NonNull DOMNotification notification)
             throws InterruptedException;
 
     /**
@@ -79,7 +79,7 @@ public interface DOMNotificationPublishService extends DOMService {
      *         delivery.
      * @throws NullPointerException if notification is null.
      */
-    @Nonnull ListenableFuture<? extends Object> offerNotification(@Nonnull DOMNotification notification);
+    @NonNull ListenableFuture<? extends Object> offerNotification(@NonNull DOMNotification notification);
 
     /**
      * Attempt to publish a notification. The result of this method is a {@link ListenableFuture}
@@ -100,6 +100,6 @@ public interface DOMNotificationPublishService extends DOMService {
      * @throws NullPointerException if notification or unit is null.
      * @throws IllegalArgumentException if timeout is negative.
      */
-    @Nonnull ListenableFuture<? extends Object> offerNotification(@Nonnull DOMNotification notification,
-        @Nonnegative long timeout, @Nonnull TimeUnit unit) throws InterruptedException;
+    @NonNull ListenableFuture<? extends Object> offerNotification(@NonNull DOMNotification notification,
+            @Nonnegative long timeout, @NonNull TimeUnit unit) throws InterruptedException;
 }