X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fdata%2FDataCommitHandler.java;h=22e95197bb4c2fb9c3886492cf7635cacf18c7d2;hb=b1e455ac4685602b7b3290192906c607d2c92c71;hp=90de13d15e8229238f36c5ec59b1180babcff1ae;hpb=7bc6403c0fe122ff37ef774f58c1ad2c7d714407;p=controller.git 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 index 90de13d15e..22e95197bb 100644 --- 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 @@ -7,31 +7,29 @@ */ package org.opendaylight.controller.md.sal.common.api.data; -import org.opendaylight.controller.sal.common.DataStoreIdentifier; -// FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments. -// import org.opendaylight.yangtools.concepts.Path; +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. - * + * *
* 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. - * + * *
* 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). - * - * The commit handlers are responsible for changing the internal state of the - * provider to reflect the commited changes in data. - * + * + * Commit handlers are responsible for changing the internal state of the + * provider to reflect the committed changes in data. + * *
Consumer
edits data by invocation of
* DataBrokerService.editCandidateData(DataStoreIdentifier, DataRoot)
@@ -51,9 +49,9 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
* Broker
starts a commit finish phase
*
- *
+ *
* CommitTransaction
from Commit Request phase
* DataCommitTransaction
from Commit Request phase
* Class representing a path
* @param */,D> {
+public interface DataCommitHandler , D> {
+
-
DataCommitTransaction requestCommit(DataModification modification);
- public interface DataCommitTransaction */,D> {
+ public interface DataCommitTransaction , D> {
DataModification 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