X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2Fapi%2Fdata%2FDataBrokerService.java;h=266b6976afbde367ecca294a90023253d903b0ff;hp=fef894ba5c52b2bd13132136ac1c07e35c5aeaf0;hb=83e1c610eeefba667a19c243fbc1098072a8079d;hpb=6b64494fd8e4654a298312afb4b8e6e827b75d5d diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataBrokerService.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataBrokerService.java index fef894ba5c..266b6976af 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataBrokerService.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/data/DataBrokerService.java @@ -7,130 +7,34 @@ */ package org.opendaylight.controller.sal.core.api.data; -import java.util.Set; -import java.util.concurrent.Future; - -import org.opendaylight.controller.sal.common.DataStoreIdentifier; +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.core.api.BrokerService; -import org.opendaylight.controller.sal.core.api.Consumer; -import org.opendaylight.controller.sal.core.api.Provider; -import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.data.api.CompositeNode; -import org.opendaylight.yangtools.yang.data.api.MutableCompositeNode; -import org.opendaylight.yangtools.yang.data.api.Node; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; /** * DataBrokerService provides unified access to the data stores available in the * system. - * - * + * + * * @see DataProviderService - * + * */ -public interface DataBrokerService extends BrokerService { - - - Set getDataStores(); - - /** - * Returns a data from specified Data Store. - * - * Returns all the data visible to the consumer from specified Data Store. - * - * @param store - * Identifier of the store, from which will be data retrieved - * @return data visible to the consumer - */ - CompositeNode getData(DataStoreIdentifier store); - - /** - * Returns a filtered subset of 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 store - * Identifier of the store, from which will be data retrieved - * @param filter - * Data tree filter similar to the NETCONF filter - * @return - */ - CompositeNode getData(DataStoreIdentifier store, CompositeNode filter); +public interface DataBrokerService extends + BrokerService, // + DataReader, // + DataModificationTransactionFactory, // + DataChangePublisher { - /** - * Returns a candidate data which are not yet commited. - * - * - * @param store - * Identifier of the store, from which will be data retrieved - * @return - */ - CompositeNode getCandidateData(DataStoreIdentifier store); - /** - * 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 store - * Identifier of the store, from which will be data retrieved - * @param filter - * A CompositeNode filter - * @return - */ - CompositeNode getCandidateData(DataStoreIdentifier store, - CompositeNode filter); + @Override + public CompositeNode readConfigurationData(InstanceIdentifier path); - /** - * - * @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. - */ - RpcResult editCandidateData(DataStoreIdentifier store, - MutableCompositeNode changeSet); + @Override + public CompositeNode readOperationalData(InstanceIdentifier path); - /** - * 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. - */ - Future> commit(DataStoreIdentifier store); + DataModificationTransaction beginTransaction(); }