X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2FBindingDOMNotificationPublishServiceAdapter.java;h=c2558c3637eb02673f3f528d18c8bd2cf40a9f9c;hb=4dab19f89e79f43d3b270072f7260128788804ff;hp=1fe81ea3f497d6511293582e19feb237cb10bad4;hpb=0f518a7ba2c8ceb3b4e9d038faca7c9b315db7d4;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationPublishServiceAdapter.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationPublishServiceAdapter.java index 1fe81ea3f4..c2558c3637 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationPublishServiceAdapter.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationPublishServiceAdapter.java @@ -21,19 +21,13 @@ import org.opendaylight.yangtools.yang.binding.Notification; public class BindingDOMNotificationPublishServiceAdapter implements NotificationPublishService, AutoCloseable { - static final Factory BUILDER_FACTORY = new BindingDOMAdapterBuilder.Factory() { - - @Override - public BindingDOMAdapterBuilder newBuilder() { - return new Builder(); - } - - }; + static final Factory BUILDER_FACTORY = Builder::new; private final BindingToNormalizedNodeCodec codecRegistry; private final DOMNotificationPublishService domPublishService; - public BindingDOMNotificationPublishServiceAdapter(final BindingToNormalizedNodeCodec codec, final DOMNotificationPublishService domPublishService) { + public BindingDOMNotificationPublishServiceAdapter(final BindingToNormalizedNodeCodec codec, + final DOMNotificationPublishService domPublishService) { this.codecRegistry = codec; this.domPublishService = domPublishService; } @@ -52,7 +46,7 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification } @Override - public ListenableFuture offerNotification(final Notification notification) { + public ListenableFuture offerNotification(final Notification notification) { ListenableFuture offerResult = domPublishService.offerNotification(toDomNotification(notification)); return DOMNotificationPublishService.REJECTED.equals(offerResult) ? NotificationPublishService.REJECTED @@ -60,8 +54,10 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification } @Override - public ListenableFuture offerNotification(final Notification notification, final int timeout, final TimeUnit unit) throws InterruptedException { - ListenableFuture offerResult = domPublishService.offerNotification(toDomNotification(notification), timeout, unit); + public ListenableFuture offerNotification(final Notification notification, final int timeout, + final TimeUnit unit) throws InterruptedException { + ListenableFuture offerResult = domPublishService.offerNotification(toDomNotification(notification), + timeout, unit); return DOMNotificationPublishService.REJECTED.equals(offerResult) ? NotificationPublishService.REJECTED : offerResult; @@ -72,7 +68,7 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification } @Override - public void close() throws Exception { + public void close() { } @@ -89,6 +85,5 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification final DOMNotificationPublishService domPublish = delegates.getInstance(DOMNotificationPublishService.class); return new BindingDOMNotificationPublishServiceAdapter(codec, domPublish); } - } }