2 * Copyright © 2018 Red Hat, Inc. and others.
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.binding.util;
10 import com.google.common.util.concurrent.FluentFuture;
11 import org.opendaylight.mdsal.binding.api.WriteTransaction;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16 * Implementation of {@link TypedWriteTransaction}.
18 * @param <D> The datastore which the transaction targets.
19 * @param <X> WriteTransaction type
21 class TypedWriteTransactionImpl<D extends Datastore, X extends WriteTransaction> extends TypedTransaction<D, X>
22 implements TypedWriteTransaction<D> {
23 TypedWriteTransactionImpl(final D datastore, final X realTx) {
24 super(datastore, realTx);
28 public final <T extends DataObject> void put(final InstanceIdentifier<T> path, final T data) {
29 delegate().put(getDatastoreType(), path, data);
34 public final <T extends DataObject> void mergeParentStructurePut(final InstanceIdentifier<T> path,
36 delegate().mergeParentStructurePut(getDatastoreType(), path, data);
41 public final <T extends DataObject> void merge(final InstanceIdentifier<T> path, final T data) {
42 delegate().merge(getDatastoreType(), path, data);
47 public final <T extends DataObject> void mergeParentStructureMerge(final InstanceIdentifier<T> path,
49 delegate().mergeParentStructureMerge(getDatastoreType(), path, data);
54 public final void delete(final InstanceIdentifier<?> path) {
55 delegate().delete(getDatastoreType(), path);
60 public final FluentFuture<?> completionFuture() {
61 return delegate().completionFuture();
64 void postOperation() {