Bug 4035: Remove deprecated Hydrogen interfaces 76/24476/5
authorTony Tkacik <ttkacik@cisco.com>
Thu, 23 Jul 2015 13:07:38 +0000 (15:07 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Wed, 19 Aug 2015 12:11:00 +0000 (14:11 +0200)
This remove set of interfaces which
is safe to remove without breaking projects which did not
yet migrated from Hydrogen interfaces to Helium / Lithium one.

Also removes some related methods in such interfaces which
are unused in current public Beryllium codebase in
projects using MD-SAL.

Change-Id: I2ac67ead4ea4d9d97d0198d62910e667318dc03a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
15 files changed:
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataModificationTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataProviderService.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HydrogenDataBrokerAdapter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HydrogenMountInstanceAdapter.java
opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/AbstractBindingSalProviderInstance.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataChangePublisher.java [deleted file]
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataCommitHandler.java [deleted file]
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataCommitHandlerRegistration.java [deleted file]
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModification.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModificationTransactionFactory.java [deleted file]
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataProvider.java [deleted file]
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataProvisionService.java [deleted file]
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataStore.java [deleted file]
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/CommitHandlerTransactions.java [deleted file]

index d30ca6b..b274a05 100644 (file)
@@ -7,8 +7,6 @@
  */
 package org.opendaylight.controller.sal.binding.api.data;
 
-import org.opendaylight.controller.md.sal.common.api.data.DataChangePublisher;
-import org.opendaylight.controller.md.sal.common.api.data.DataModificationTransactionFactory;
 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.sal.binding.api.BindingAwareService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -24,11 +22,8 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * @deprecated Replaced by newer better documented version {@link org.opendaylight.controller.md.sal.binding.api.DataBroker}
  */
 @Deprecated
-public interface DataBrokerService extends //
-        BindingAwareService, //
-        DataModificationTransactionFactory<InstanceIdentifier<? extends DataObject>, DataObject>, //
-        DataReader<InstanceIdentifier<? extends DataObject>, DataObject>, //
-        DataChangePublisher<InstanceIdentifier<? extends DataObject>, DataObject, DataChangeListener> {
+public interface DataBrokerService extends BindingAwareService,
+        DataReader<InstanceIdentifier<? extends DataObject>, DataObject> {
     /**
      * Creates a data modification transaction.
      *
@@ -40,7 +35,6 @@ public interface DataBrokerService extends //
      *          {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newWriteOnlyTransaction().
      */
     @Deprecated
-    @Override
     DataModificationTransaction beginTransaction();
 
     /**
@@ -52,8 +46,8 @@ public interface DataBrokerService extends //
      * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
      *
      */
-    @Deprecated
     @Override
+    @Deprecated
     public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
 
     /**
@@ -63,8 +57,8 @@ public interface DataBrokerService extends //
      *
      * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
      */
-    @Deprecated
     @Override
+    @Deprecated
     public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
 
     /**
@@ -76,7 +70,6 @@ public interface DataBrokerService extends //
      * which provides more fine-grained registration options.
      */
     @Deprecated
-    @Override
     public ListenerRegistration<DataChangeListener> registerDataChangeListener(
             InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);
 }
index 0c250fd..e1055c0 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.sal.binding.api.data;
 
 import java.util.EventListener;
 import java.util.concurrent.Future;
-
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.md.sal.common.api.data.DataModification;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -29,7 +28,8 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
  *
  */
 @Deprecated
-public interface DataModificationTransaction extends DataModification<InstanceIdentifier<? extends DataObject>, DataObject> {
+public interface DataModificationTransaction extends
+        DataModification<InstanceIdentifier<? extends DataObject>, DataObject> {
     /**
      * Returns an unique identifier for transaction
      *
index 7fa40b8..14a1e8a 100644 (file)
@@ -7,11 +7,6 @@
  */
 package org.opendaylight.controller.sal.binding.api.data;
 
-import org.opendaylight.controller.md.sal.common.api.data.DataProvisionService;
-import org.opendaylight.controller.md.sal.common.api.data.DataReader;
-import org.opendaylight.yangtools.concepts.Registration;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * DataProviderService is common access point for {@link org.opendaylight.controller.sal.binding.api.BindingAwareProvider} providers
@@ -20,18 +15,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * @deprecated Replaced by {@link org.opendaylight.controller.md.sal.common.api.data.AsyncConfigurationCommitCoordinator} service.
  */
 @Deprecated
-public interface DataProviderService extends DataBrokerService, DataProvisionService<InstanceIdentifier<? extends DataObject>, DataObject> {
-    /**
-     * Registers a data reader for particular subtree of overal YANG data tree.
-     *
-     * Registered data reader is called if anyone tries to read data from
-     * paths which are nested to provided path.
-     *
-     * @param path Subpath which is handled by registered data reader
-     * @param reader Instance of reader which
-     * @return Registration object for reader. Invoking {@link Registration#close()} will unregister reader.
-     * @deprecated Data Reader contract is removed from capabilities of MD-SAL and is replaced by  replaced by org.opendaylight.controller.sal.core.spi.data.DOMStore contract.
-     */
-    @Deprecated
-    Registration registerDataReader(InstanceIdentifier<? extends DataObject> path,DataReader<InstanceIdentifier<? extends DataObject>,DataObject> reader);
+public interface DataProviderService extends DataBrokerService {
+
 }
index da6859b..a4f260c 100644 (file)
@@ -7,49 +7,31 @@
  */
 package org.opendaylight.controller.md.sal.binding.compat;
 
-import com.google.common.base.Function;
-import com.google.common.util.concurrent.AsyncFunction;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.RegistrationListener;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
 import org.opendaylight.controller.md.sal.common.api.data.DataChangeEvent;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler.DataCommitTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandlerRegistration;
-import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.impl.service.AbstractDataTransaction;
 import org.opendaylight.controller.sal.binding.api.data.DataChangeListener;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
-import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
-import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
 import org.opendaylight.yangtools.concepts.Delegator;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.util.ListenerRegistry;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
-import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -58,10 +40,6 @@ public class HydrogenDataBrokerAdapter implements DataProviderService, AutoClose
 
     private static final Logger LOG = LoggerFactory.getLogger(HydrogenDataBrokerAdapter.class);
 
-    private final ConcurrentMap<InstanceIdentifier<?>, CommitHandlerRegistrationImpl> commitHandlers =
-            new ConcurrentHashMap<>();
-    private final ListeningExecutorService executorService = SingletonHolder.getDefaultCommitExecutor();
-
     private final DataBroker delegate;
 
     public HydrogenDataBrokerAdapter(final DataBroker dataBroker) {
@@ -86,22 +64,6 @@ public class HydrogenDataBrokerAdapter implements DataProviderService, AutoClose
         return tx.readOperationalData(path);
     }
 
-    @Override
-    public Registration registerCommitHandler(
-            final InstanceIdentifier<? extends DataObject> path,
-            final DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject> commitHandler) {
-        final CommitHandlerRegistrationImpl reg = new CommitHandlerRegistrationImpl(path, commitHandler);
-        commitHandlers.put(path, reg);
-        return reg;
-    }
-
-    @Override
-    @Deprecated
-    public ListenerRegistration<RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>>> registerCommitHandlerListener(
-            final RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>> commitHandlerListener) {
-        throw new UnsupportedOperationException("Not supported contract.");
-    }
-
     @Override
     public ListenerRegistration<DataChangeListener> registerDataChangeListener(
             final InstanceIdentifier<? extends DataObject> path, final DataChangeListener listener) {
@@ -116,70 +78,6 @@ public class HydrogenDataBrokerAdapter implements DataProviderService, AutoClose
         return new LegacyListenerRegistration(listener,cfgReg,operReg);
     }
 
-    @Override
-    public Registration registerDataReader(
-            final InstanceIdentifier<? extends DataObject> path,
-            final DataReader<InstanceIdentifier<? extends DataObject>, DataObject> reader) {
-        throw new UnsupportedOperationException("Data reader contract is not supported.");
-    }
-
-    public ListenableFuture<RpcResult<TransactionStatus>> commit(final ForwardedBackwardsCompatibleTransacion tx) {
-
-        final List<DataCommitTransaction<InstanceIdentifier<? extends DataObject>, DataObject>> subTrans = new ArrayList<>();
-        LOG.debug("Tx: {} Submitted.",tx.getIdentifier());
-        final ListenableFuture<Boolean> requestCommit = executorService.submit(new Callable<Boolean>() {
-
-            @Override
-            public Boolean call() throws Exception {
-                try {
-                    for (final CommitHandlerRegistrationImpl handler : commitHandlers.values()) {
-
-                        final DataCommitTransaction<InstanceIdentifier<? extends DataObject>, DataObject> subTx = handler
-                                .getInstance().requestCommit(tx);
-                        subTrans.add(subTx);
-                    }
-                } catch (final Exception e) {
-                    LOG.error("Tx: {} Rollback.",tx.getIdentifier(),e);
-                    for (final DataCommitTransaction<InstanceIdentifier<? extends DataObject>, DataObject> subTx : subTrans) {
-                        subTx.rollback();
-                    }
-                    return false;
-                }
-                LOG.debug("Tx: {} Can Commit True.",tx.getIdentifier());
-                return true;
-            }
-
-        });
-
-        final ListenableFuture<RpcResult<TransactionStatus>> dataStoreCommit = Futures.transform(requestCommit, new AsyncFunction<Boolean, RpcResult<TransactionStatus>>() {
-
-            @Override
-            public ListenableFuture<RpcResult<TransactionStatus>> apply(final Boolean requestCommitSuccess) throws Exception {
-                if(requestCommitSuccess) {
-                    return AbstractDataTransaction.convertToLegacyCommitFuture(tx.delegate.submit());
-                }
-                return Futures.immediateFuture(RpcResultBuilder.<TransactionStatus>failed().withResult(TransactionStatus.FAILED).build());
-            }
-        });
-
-        return Futures.transform(dataStoreCommit, new Function<RpcResult<TransactionStatus>,RpcResult<TransactionStatus>>() {
-            @Override
-            public RpcResult<TransactionStatus> apply(final RpcResult<TransactionStatus> input) {
-                if(input.isSuccessful()) {
-                    for(final DataCommitTransaction<InstanceIdentifier<? extends DataObject>, DataObject> subTx : subTrans ) {
-                        subTx.finish();
-                    }
-                } else {
-                    LOG.error("Tx: {} Rollback - Datastore commit failed.",tx.getIdentifier());
-                    for(final DataCommitTransaction<InstanceIdentifier<? extends DataObject>, DataObject> subTx : subTrans ) {
-                        subTx.rollback();
-                    }
-                }
-                return input;
-            }
-        });
-    }
-
     @Deprecated
     private class ForwardedBackwardsCompatibleTransacion implements DataModificationTransaction {
 
@@ -335,7 +233,7 @@ public class HydrogenDataBrokerAdapter implements DataProviderService, AutoClose
 
             changeStatus(TransactionStatus.SUBMITED);
 
-            final ListenableFuture<RpcResult<TransactionStatus>> f = HydrogenDataBrokerAdapter.this.commit(this);
+            final ListenableFuture<RpcResult<TransactionStatus>> f = delegate.commit();
 
             Futures.addCallback(f, new FutureCallback<RpcResult<TransactionStatus>>() {
                 @Override
@@ -366,25 +264,6 @@ public class HydrogenDataBrokerAdapter implements DataProviderService, AutoClose
 
     }
 
-    private class CommitHandlerRegistrationImpl extends
-            AbstractObjectRegistration<DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject>> {
-
-        private final InstanceIdentifier<? extends DataObject> path;
-
-        public CommitHandlerRegistrationImpl(final InstanceIdentifier<? extends DataObject> path,
-                final DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject> commitHandler) {
-            super(commitHandler);
-            this.path = path;
-        }
-
-        @Override
-        protected void removeRegistration() {
-            commitHandlers.remove(path, this);
-        }
-
-    }
-
-
     private static final class LegacyListenerRegistration implements ListenerRegistration<DataChangeListener> {
 
         private final DataChangeListener instance;
index e7aea8d..49340fa 100644 (file)
@@ -14,10 +14,6 @@ import com.google.common.collect.ImmutableClassToInstanceMap;
 import java.util.concurrent.ExecutorService;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.MountPoint;
-import org.opendaylight.controller.md.sal.common.api.RegistrationListener;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandlerRegistration;
-import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
@@ -30,11 +26,9 @@ import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
 import org.opendaylight.controller.sal.binding.api.data.DataChangeListener;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
-import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
 import org.opendaylight.controller.sal.binding.api.mount.MountProviderInstance;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.Notification;
@@ -138,24 +132,6 @@ public class HydrogenMountInstanceAdapter implements MountProviderInstance {
         service(NotificationProviderService.class).publish(notification);
     }
 
-    @Override
-    public Registration registerCommitHandler(final InstanceIdentifier<? extends DataObject> arg0,
-            final DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject> arg1) {
-        return service(DataProviderService.class).registerCommitHandler(arg0, arg1);
-    }
-
-    @Override
-    public ListenerRegistration<RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>>> registerCommitHandlerListener(
-            final RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>> arg0) {
-        return service(DataProviderService.class).registerCommitHandlerListener(arg0);
-    }
-
-    @Override
-    public Registration registerDataReader(final InstanceIdentifier<? extends DataObject> path,
-            final DataReader<InstanceIdentifier<? extends DataObject>, DataObject> reader) {
-        return service(DataProviderService.class).registerDataReader(path, reader);
-    }
-
     @Override
     public ListenerRegistration<NotificationInterestListener> registerInterestListener(
             final NotificationInterestListener interestListener) {
index 830942f..bba3201 100644 (file)
@@ -8,11 +8,6 @@
 package org.opendaylight.controller.md.sal.binding.util;
 
 import java.util.concurrent.ExecutorService;
-
-import org.opendaylight.controller.md.sal.common.api.RegistrationListener;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandlerRegistration;
-import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
@@ -21,8 +16,6 @@ import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
 import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Registration;
-import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.Notification;
 import org.opendaylight.yangtools.yang.binding.RpcService;
@@ -34,62 +27,42 @@ public abstract class AbstractBindingSalProviderInstance<D extends DataProviderS
         RpcProviderRegistry, //
         NotificationProviderService {
 
-    public AbstractBindingSalProviderInstance(R rpcRegistry, N notificationBroker,
-            D dataBroker) {
+    public AbstractBindingSalProviderInstance(final R rpcRegistry, final N notificationBroker,
+            final D dataBroker) {
         super(rpcRegistry, notificationBroker, dataBroker);
     }
 
     @Override
-    public Registration registerDataReader(
-            InstanceIdentifier<? extends DataObject> path,
-            DataReader<InstanceIdentifier<? extends DataObject>, DataObject> reader) {
-        return getDataBrokerChecked().registerDataReader(path, reader);
-    }
-
-    @Override
-    public Registration registerCommitHandler(
-            InstanceIdentifier<? extends DataObject> path,
-            DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject> commitHandler) {
-        return getDataBrokerChecked().registerCommitHandler(path, commitHandler);
-    }
-
-    @Override
-    public ListenerRegistration<RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>>> registerCommitHandlerListener(
-            RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>> commitHandlerListener) {
-        return getDataBrokerChecked().registerCommitHandlerListener(commitHandlerListener);
-    }
-
-    @Override
-    public <T extends RpcService> RpcRegistration<T> addRpcImplementation(Class<T> type, T implementation)
+    public <T extends RpcService> RpcRegistration<T> addRpcImplementation(final Class<T> type, final T implementation)
             throws IllegalStateException {
         return getRpcRegistryChecked().addRpcImplementation(type, implementation);
     }
 
     @Override
-    public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type, T implementation)
+    public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(final Class<T> type, final T implementation)
             throws IllegalStateException {
         return getRpcRegistryChecked().addRoutedRpcImplementation(type, implementation);
     }
 
     @Override
-    public void publish(Notification notification) {
+    public void publish(final Notification notification) {
         getNotificationBrokerChecked().publish(notification);
     }
 
     @Override
-    public void publish(Notification notification, ExecutorService service) {
+    public void publish(final Notification notification, final ExecutorService service) {
         getNotificationBrokerChecked().publish(notification, service);
     }
 
     @Override
     public <L extends RouteChangeListener<RpcContextIdentifier, InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(
-            L listener) {
+            final L listener) {
         return getRpcRegistryChecked().registerRouteChangeListener(listener);
     }
 
     @Override
     public ListenerRegistration<NotificationInterestListener> registerInterestListener(
-            NotificationInterestListener interestListener) {
+            final NotificationInterestListener interestListener) {
         return getNotificationBrokerChecked().registerInterestListener(interestListener);
     }
 }
diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataChangePublisher.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataChangePublisher.java
deleted file mode 100644 (file)
index 222dba8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2013 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.common.api.data;
-
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Path;
-
-/**
- *
- * @deprecated Replaced by {@link AsyncDataBroker}
- */
-@Deprecated
-public interface DataChangePublisher<P extends Path<P>, D, L extends DataChangeListener<P,D>> {
-
-    ListenerRegistration<L> registerDataChangeListener(P path, L listener);
-
-}
diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataCommitHandler.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataCommitHandler.java
deleted file mode 100644 (file)
index a9f02a8..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2013 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.common.api.data;
-
-import org.opendaylight.yangtools.concepts.Path;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-/**
- * Two phase commit handler (cohort) of the two-phase commit protocol of data.
- *
- * <p>
- * The provider should expose the implementation of DataCommitHandler if it's
- * functionality depends on any subset of data stored in data repositories, in
- * order to participate in {@link DataBrokerService#commit(DataStoreIdentifier)
- * operation.
- *
- * <p>
- * Operations of two-phase commit handlers should not change data in data store,
- * this is responsibility of the coordinator (broker or some component of the
- * broker).
- *
- * Commit handlers are responsible for changing the internal state of the
- * provider to reflect the committed changes in data.
- *
- * <h3>Two-phase commit</h3>
- *
- * <h4>Commit Request Phase</h4>
- *
- * <ol>
- * <li> <code>Consumer</code> edits data by invocation of
- * <code>DataBrokerService.editCandidateData(DataStoreIdentifier, DataRoot)</code>
- * <li> <code>Consumer</code> starts a commit by invoking
- * <code>DataBrokerService.commit(DataStoreIdentifier)</code>
- * <li> <code>Broker</code> retrieves a list of all registered
- * <code>DataCommitHandlers</code>
- * <li>For each <code>DataCommitHandler</code>
- * <ol>
- * <li><code>Broker</code> invokes a
- * <code>DataCommitHandler.requestCommit(DataStoreIdentifier)</code> operation.
- * <li><code>DataCommitHandler</code> returns a <code>RpcResult</code> with
- * <code>CommitTransaction</code>
- * <li>If the result was successful, broker adds <code>CommitTransaction</code>
- * to the list of opened transactions. If not, brokers stops a commit request
- * phase and starts a rollback phase.
- * </ol>
- * <li><code>Broker</code> starts a commit finish phase
- * </ol>
- *
- * <h4>Commit Finish Phase</h4>
- *
- * <ol>
- * <li>For each <code>CommitTransaction</code> from Commit Request phase
- * <ol>
- * <li><code>Broker</code> broker invokes a
- * <code>CommitTransaction.finish()</code>
- * <li>The provider finishes a commit (applies the change) and returns an
- * <code>RpcResult</code>.
- * </ol>
- * <li>
- * <ul>
- * <li>If all returned results means successful, the brokers end two-phase
- * commit by returning a success commit result to the Consumer.
- * <li>If error occured, the broker starts a commit rollback phase.
- * </ul>
- * </ol>
- *
- * <h4>Commit Rollback Phase</h4>
- * <li>For each <code>DataCommitTransaction</code> from Commit Request phase
- * <ol>
- * <li><code>Broker</code>
- * broker invokes a {@link DataCommitTransaction#finish()}
- * <li>The provider rollbacks a commit and returns an {@link RpcResult} of
- * rollback. </ol>
- * <li>Broker returns a error result to the consumer.
- *
- * @param <P> Class representing a path
- * @param <D> Superclass from which all data objects are derived from.
- * @deprecated Replaced by {@link AsyncConfigurationCommitHandler}
- */
-@Deprecated
-public interface DataCommitHandler<P extends Path<P>, D> {
-
-
-    DataCommitTransaction<P, D> requestCommit(DataModification<P,D> modification);
-
-    public interface DataCommitTransaction<P extends Path<P>, D> {
-
-        DataModification<P,D> getModification();
-
-        /**
-         *
-         * Finishes a commit.
-         *
-         * This callback is invoked by commit coordinator to finish commit action.
-         *
-         * The implementation is required to finish transaction or return unsuccessful
-         * rpc result if something went wrong.
-         *
-         * The provider (commit handler) should apply all changes to its state
-         * which are a result of data change-
-         *
-         * @return
-         */
-        RpcResult<Void> finish() throws IllegalStateException;
-
-        /**
-         * Rollbacks a commit.
-         *
-         * This callback is invoked by commit coordinator to finish commit action.
-         *
-         * The provider (commit handler) should rollback all changes to its state
-         * which were a result of previous request commit.
-         *
-         * @return
-         * @throws IllegalStateException
-         *             If the method is invoked after {@link #finish()}
-         */
-        RpcResult<Void> rollback() throws IllegalStateException;
-    }
-
-}
diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataCommitHandlerRegistration.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataCommitHandlerRegistration.java
deleted file mode 100644 (file)
index dceb3de..0000000
+++ /dev/null
@@ -1,26 +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.common.api.data;
-
-import org.opendaylight.yangtools.concepts.Path;
-import org.opendaylight.yangtools.concepts.Registration;
-
-/**
- *
- *
- * @deprecated THis was intended as Registration object, normal use of {@link org.opendaylight.yangtools.concepts.ObjectRegistration}
- * is suffiecient, since {@link #getPath()} was implementation leak.
- *
- * @param <P>
- * @param <D>
- */
-@Deprecated
-public interface DataCommitHandlerRegistration<P extends Path<P>,D> extends Registration {
-
-    P getPath();
-}
index 630078d..f90098c 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.controller.md.sal.common.api.data;
 
 import java.util.concurrent.Future;
-
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.common.RpcResult;
diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModificationTransactionFactory.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataModificationTransactionFactory.java
deleted file mode 100644 (file)
index 6a370b8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (c) 2013 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.common.api.data;
-
-import org.opendaylight.yangtools.concepts.Path;
-/**
- *
- * @deprecated Replaced by {@link AsyncDataTransactionFactory}
- */
-@Deprecated
-public interface DataModificationTransactionFactory<P extends Path<P> ,D> {
-
-    DataModification<P, D> beginTransaction();
-}
diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataProvider.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataProvider.java
deleted file mode 100644 (file)
index fdeda28..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2013 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.common.api.data;
-
-import org.opendaylight.yangtools.concepts.Path;
-
-/**
- *
- *
- * @deprecated Replaced by org.opendaylight.controller.sal.core.spi.data.DOMStore contract.
- */
-@Deprecated
-public interface DataProvider<P extends Path<P>, D> extends DataReader<P, D> {
-
-}
diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataProvisionService.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataProvisionService.java
deleted file mode 100644 (file)
index 6c7166e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2013 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.common.api.data;
-
-import org.opendaylight.controller.md.sal.common.api.RegistrationListener;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.concepts.Path;
-import org.opendaylight.yangtools.concepts.Registration;
-
-/**
- *
- *
- * @deprecated replaced by {@link AsyncDataBroker} and {@link AsyncConfigurationCommitCoordinator}
- */
-@Deprecated
-public interface DataProvisionService<P extends Path<P> , D> {
-
-    public Registration registerCommitHandler(P path, DataCommitHandler<P, D> commitHandler);
-
-    public ListenerRegistration<RegistrationListener<DataCommitHandlerRegistration<P, D>>>
-        registerCommitHandlerListener(RegistrationListener<DataCommitHandlerRegistration<P, D>> commitHandlerListener);
-
-}
diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataStore.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataStore.java
deleted file mode 100644 (file)
index 5688dd0..0000000
+++ /dev/null
@@ -1,30 +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.common.api.data;
-
-import org.opendaylight.yangtools.concepts.Path;
-
-/**
- *
- * @deprecated Replaced by org.opendaylight.controller.sal.core.spi.data.DOMStore Contract.
- */
-@Deprecated
-public interface DataStore<P extends Path<P>, D> extends //
-        DataReader<P, D>, //
-        DataModificationTransactionFactory<P, D> {
-
-    @Override
-    public DataModification<P, D> beginTransaction();
-
-    @Override
-    public D readConfigurationData(P path);
-
-    @Override
-    public D readOperationalData(P path);
-
-}
diff --git a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/CommitHandlerTransactions.java b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/CommitHandlerTransactions.java
deleted file mode 100644 (file)
index ded2d59..0000000
+++ /dev/null
@@ -1,47 +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.sal.common.util;
-
-import org.opendaylight.controller.md.sal.common.api.data.DataModification;
-import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler.DataCommitTransaction;
-import org.opendaylight.yangtools.concepts.Path;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
-
-/**
- * @deprecated Utility class for {@link DataCommitTransaction}, will be removed at the same time.
- */
-@Deprecated
-public class CommitHandlerTransactions {
-
-    private static class AllwaysSuccessfulTransaction<P extends Path<P>,D> implements DataCommitTransaction<P, D> {
-
-        private final  DataModification<P, D> modification;
-
-        public AllwaysSuccessfulTransaction(DataModification<P, D> modification) {
-            this.modification = modification;
-        }
-        @Override
-        public RpcResult<Void> rollback() throws IllegalStateException {
-            return RpcResultBuilder.<Void>success().build();
-        }
-        @Override
-        public RpcResult<Void> finish() throws IllegalStateException {
-            return RpcResultBuilder.<Void>success().build();
-        }
-
-        @Override
-        public DataModification<P, D> getModification() {
-            return modification;
-        }
-    }
-
-    public static final <P extends Path<P>,D> AllwaysSuccessfulTransaction<P, D> allwaysSuccessfulTransaction(DataModification<P, D> modification)  {
-        return new AllwaysSuccessfulTransaction<>(modification);
-    }
-}

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.