X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FDOMNotificationRouterEvent.java;fp=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FDOMNotificationRouterEvent.java;h=0000000000000000000000000000000000000000;hb=2611e6a728e586ea34dd891f30a473bf54d6cbd8;hp=f733a2fc8b57a1e9031e467eaf389407f7f6007f;hpb=aaea3e9a92ae9d6fac04c4a065db4b35cbca9ed0;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouterEvent.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouterEvent.java deleted file mode 100644 index f733a2fc8b..0000000000 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMNotificationRouterEvent.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.md.sal.dom.broker.impl; - -import static java.util.Objects.requireNonNull; - -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.SettableFuture; -import com.lmax.disruptor.EventFactory; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; -import java.util.Collection; -import org.opendaylight.controller.md.sal.dom.api.DOMNotification; -import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener; -import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A single notification event in the disruptor ringbuffer. These objects are reused, - * so they do have mutable state. - */ -@Deprecated(forRemoval = true) -final class DOMNotificationRouterEvent { - private static final Logger LOG = LoggerFactory.getLogger(DOMNotificationRouterEvent.class); - public static final EventFactory FACTORY = DOMNotificationRouterEvent::new; - - private Collection> subscribers; - private DOMNotification notification; - private SettableFuture future; - - private DOMNotificationRouterEvent() { - // Hidden on purpose, initialized in initialize() - } - - @SuppressWarnings("checkstyle:hiddenField") - ListenableFuture initialize(final DOMNotification notification, - final Collection> - subscribers) { - this.notification = requireNonNull(notification); - this.subscribers = requireNonNull(subscribers); - this.future = SettableFuture.create(); - return this.future; - } - - void deliverNotification() { - LOG.trace("Start delivery of notification {}", notification); - for (ListenerRegistration r : subscribers) { - final DOMNotificationListener listener = r.getInstance(); - LOG.trace("Notifying listener {}", listener); - listener.onNotification(notification); - LOG.trace("Listener notification completed"); - } - LOG.trace("Delivery completed"); - } - - @SuppressFBWarnings(value = "NP_NONNULL_PARAM_VIOLATION", justification = "Void is the only allowed value") - void setFuture() { - future.set(null); - notification = null; - subscribers = null; - future = null; - } -}