/* * Copyright © 2018 Red Hat, Inc. and others. * * 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.util; import com.google.common.util.concurrent.FluentFuture; import java.util.Optional; import org.opendaylight.mdsal.binding.api.ReadWriteTransaction; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** * Implementation of {@link TypedReadWriteTransaction}. * * @param The datastore which the transaction targets. */ class TypedReadWriteTransactionImpl extends TypedWriteTransactionImpl implements TypedReadWriteTransaction { TypedReadWriteTransactionImpl(final Class datastoreType, final ReadWriteTransaction realTx) { super(datastoreType, realTx); } @Override public final FluentFuture> read(final InstanceIdentifier path) { return delegate().read(getDatastoreType(), path); } @Override public FluentFuture exists(final InstanceIdentifier path) { return delegate().exists(getDatastoreType(), path); } }