/* * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.mdsal.binding.javav2.api; import com.google.common.annotations.Beta; import java.util.function.BiConsumer; import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode; import org.opendaylight.mdsal.common.api.DataValidationFailedException; import org.opendaylight.mdsal.common.api.PostCanCommitStep; /** * Commit cohort participating in commit of data modification, which can validate data tree * modifications, with option to reject supplied modification, and with callbacks describing state * of commit. * *
* 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. * *
* 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 {@link DataBroker} or Commit coordinator * *
* Note that this may be enforced by some implementations of {@link DataTreeCommitCohortRegistry} * and such calls may fail. * *
* Validator is implementation, which only validates {@link DataTreeModification} and does not * retain any state derived from edited data - does not care if {@link DataTreeModification} was * rejected afterwards or transaction was cancelled. * *
* Implementation may opt-out from receiving {@code preCommit()}, {@code commit()}, {@code abort()}
* callbacks by returning {@link PostCanCommitStep#NOOP}.
*/
@Beta
public interface DataTreeCommitCohort