@Beta
public interface DataTreeCommitCohort<T extends DataObject>
DataTreeCommitCohorts are hooked up into commit of data tree changes and MAY
negatively affect performance of data broker / store.
Implementations of this interface are discouraged, unless you really need ability to veto data tree changes, or to provide external state change in sync with visibility of commited data.
DataTreeModification for validation purposes.
Use of any other external mutable state is discouraged, implementation MUST NOT use any
transaction related APIs on same data broker / data store instance during invocation of
callbacks, except ones provided as argument. Note that this MAY BE enforced by some
implementations of DataBroker or Commit coordinator
Note that this may be enforced by some implementations of DataTreeCommitCohortRegistry
and such calls may fail.
DataTreeModification being successfully committed until associated
PostCanCommitStep.preCommit() and
PostPreCommitStep.commit() callback was invoked.
Validator is implementation, which only validates DataTreeModification and does not
retain any state derived from edited data - does not care if DataTreeModification was
rejected afterwards or transaction was cancelled.
Implementation may opt-out from receiving preCommit(), commit(), abort()
callbacks by returning PostCanCommitStep.NOOP.
TODO: Provide example and describe more usage patterns
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.CheckedFuture<PostCanCommitStep,DataValidationFailedException> |
canCommit(Object txId,
DataTreeModification<T> modification) |
com.google.common.util.concurrent.CheckedFuture<PostCanCommitStep,DataValidationFailedException> canCommit(Object txId, DataTreeModification<T> modification)
Copyright © 2019 OpenDaylight. All rights reserved.