*/
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;
* @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.
*
* {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newWriteOnlyTransaction().
*/
@Deprecated
- @Override
DataModificationTransaction beginTransaction();
/**
* @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
*
*/
- @Deprecated
@Override
+ @Deprecated
public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
/**
*
* @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
*/
- @Deprecated
@Override
+ @Deprecated
public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
/**
* which provides more fine-grained registration options.
*/
@Deprecated
- @Override
public ListenerRegistration<DataChangeListener> registerDataChangeListener(
InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);
}
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;
*
*/
@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
*
*/
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
* @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 {
+
}
*/
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;
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) {
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) {
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 {
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
}
- 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;
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;
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;
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) {
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;
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;
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);
}
}
+++ /dev/null
-/*
- * 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);
-
-}
+++ /dev/null
-/*
- * 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;
- }
-
-}
+++ /dev/null
-/*
- * 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();
-}
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;
+++ /dev/null
-/*
- * 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();
-}
+++ /dev/null
-/*
- * 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> {
-
-}
+++ /dev/null
-/*
- * 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);
-
-}
+++ /dev/null
-/*
- * 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);
-
-}
+++ /dev/null
-/*
- * 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);
- }
-}