2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.dom.store.inmemory;
10 import org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction;
12 import com.google.common.base.Preconditions;
13 import com.google.common.util.concurrent.ListenableFuture;
14 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
16 final class ChainedTransactionCommitImpl extends InMemoryDOMStoreThreePhaseCommitCohort {
17 private final DOMStoreTransactionChainImpl txChain;
19 ChainedTransactionCommitImpl(final InMemoryDOMDataStore store, final SnapshotBackedWriteTransaction<String> transaction,
20 final DataTreeModification modification, final DOMStoreTransactionChainImpl txChain) {
21 super(store, transaction, modification);
22 this.txChain = Preconditions.checkNotNull(txChain);
26 public ListenableFuture<Void> commit() {
27 ListenableFuture<Void> ret = super.commit();
28 txChain.transactionCommited(getTransaction());