X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2Fdata%2FDataBrokerService.java;h=47855da301d4d65a2053eed4a1dc03fd1c43ec73;hb=a81d98f692b80c45bce3fe6a87e731abfb012a9f;hp=aa846ff78db2dd4a71ea77087978c559879ec654;hpb=a3dbf5335c352c7463674e31314ce2b5285cb6fe;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java index aa846ff78d..47855da301 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java @@ -7,190 +7,69 @@ */ package org.opendaylight.controller.sal.binding.api.data; -import java.util.concurrent.Future; - -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.controller.sal.common.DataStoreIdentifier; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.binding.DataObject; -import org.opendaylight.yangtools.yang.binding.DataRoot; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.common.RpcResult; /** * DataBrokerService provides unified access to the data stores available in the * system. - * - * + * + * * @see DataProviderService + * @deprecated Replaced by newer better documented version {@link org.opendaylight.controller.md.sal.binding.api.DataBroker} */ -public interface DataBrokerService extends // - BindingAwareService, // - DataModificationTransactionFactory, DataObject>, // - DataReader, DataObject>, // - DataChangePublisher, DataObject, DataChangeListener> { - - /** - * Returns a data from specified Data Store. - * - * Returns all the data visible to the consumer from specified Data Store. - * - * @param - * Interface generated from YANG module representing root of data - * @param store - * Identifier of the store, from which will be data retrieved - * @return data visible to the consumer - */ - @Deprecated - T getData(DataStoreIdentifier store, Class rootType); - - /** - * Returns a filtered subset of data from specified Data Store. - * - *

- * The filter is modeled as an hierarchy of Java TOs starting with - * implementation of {@link DataRoot} representing data root. The semantics - * of the filter tree is the same as filter semantics defined in the NETCONF - * protocol for rpc operations get and get-config - * in Section 6 of RFC6241. - * - * - * @see http://tools.ietf.org/html/rfc6241#section-6 - * @param - * Interface generated from YANG module representing root of data - * @param store - * Identifier of the store, from which will be data retrieved - * @param filter - * Data tree filter similar to the NETCONF filter - * @return - */ - @Deprecated - T getData(DataStoreIdentifier store, T filter); - - /** - * Returns a candidate data which are not yet commited. - * - * - * @param - * Interface generated from YANG module representing root of data - * @param store - * Identifier of the store, from which will be data retrieved - * @return - */ - @Deprecated - T getCandidateData(DataStoreIdentifier store, Class rootType); - - /** - * Returns a filtered subset of candidate data from specified Data Store. - * - *

- * The filter is modeled as an hierarchy of {@link Node} starting with - * {@link CompositeNode} representing data root. The semantics of the filter - * tree is the same as filter semantics defined in the NETCONF protocol for - * rpc operations get and get-config in Section 6 - * of RFC6241. - * - * - * @see http://tools.ietf.org/html/rfc6241#section-6 - * @param - * Interface generated from YANG module representing root of data - * @param store - * Identifier of the store, from which will be data retrieved - * @param filter - * A filter data root - * @return - */ - @Deprecated - T getCandidateData(DataStoreIdentifier store, T filter); - - /** - * - * @param - * Interface generated from YANG module representing root of data - * @param store - * Identifier of the store, in which will be the candidate data - * modified - * @param changeSet - * Modification of data tree. - * @return Result object containing the modified data tree if the operation - * was successful, otherwise list of the encountered errors. - */ - @Deprecated - RpcResult editCandidateData(DataStoreIdentifier store, DataRoot changeSet); - - /** - * Initiates a two-phase commit of candidate data. - * - *

- * The {@link Consumer} could initiate a commit of candidate data - * - *

- * The successful commit changes the state of the system and may affect - * several components. - * - *

- * The effects of successful commit of data are described in the - * specifications and YANG models describing the {@link Provider} components - * of controller. It is assumed that {@link Consumer} has an understanding - * of this changes. - * - * - * @see DataCommitHandler for further information how two-phase commit is - * processed. - * @param store - * Identifier of the store, where commit should occur. - * @return Result of the commit, containing success information or list of - * encountered errors, if commit was not successful. - */ - @Deprecated - Future> commit(DataStoreIdentifier store); - - @Deprecated - DataObject getData(InstanceIdentifier data); - - @Deprecated - DataObject getConfigurationData(InstanceIdentifier data); +@Deprecated +public interface DataBrokerService extends BindingAwareService, + DataReader, DataObject> { /** * Creates a data modification transaction. - * + * * @return new blank data modification transaction. + * @deprecated Replaced by more specific transaction types. Please use + * {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}, + * {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadWriteTransaction()} + * or + * {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newWriteOnlyTransaction()}. */ - DataModificationTransaction beginTransaction(); - - @Deprecated - public void registerChangeListener(InstanceIdentifier path, DataChangeListener changeListener); - @Deprecated - public void unregisterChangeListener(InstanceIdentifier path, DataChangeListener changeListener); + DataModificationTransaction beginTransaction(); /** - * Reads data subtree from configurational store. - * (Store which is populated by consumer, which is usually used to - * inject state into providers. E.g. Flow configuration)- - * + * Reads data subtree from configurational store. + * (Store which is populated by consumer, which is usually used to + * inject state into providers. E.g. Flow configuration) + * + * + * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()} + * */ @Override - public DataObject readConfigurationData(InstanceIdentifier path); - + @Deprecated + DataObject readConfigurationData(InstanceIdentifier path); + /** - * Reads data subtree from operational store. - * (Store which is populated by providers, which is usually used to + * Reads data subtree from operational store. + * (Store which is populated by providers, which is usually used to * capture state of providers. E.g. Topology) - * + * + * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()} */ @Override - public DataObject readOperationalData(InstanceIdentifier path); - + @Deprecated + DataObject readOperationalData(InstanceIdentifier path); + /** - * Register a data change listener for particular subtree. - * + * Register a data change listener for particular subtree. + * * Callback is invoked each time data in subtree changes. - * + * + * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#registerDataChangeListener(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, InstanceIdentifier, org.opendaylight.controller.md.sal.binding.api.DataChangeListener, org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope)} + * which provides more fine-grained registration options. */ - @Override - public ListenerRegistration registerDataChangeListener( + @Deprecated + ListenerRegistration registerDataChangeListener( InstanceIdentifier path, DataChangeListener listener); }