/* * Copyright © 2017 AT&T, Inc. 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.transportpce.common.network; import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.ListenableFuture; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.mdsal.common.api.CommitInfo; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class NetworkTransactionImpl implements NetworkTransactionService { RequestProcessor requestProcessor; public NetworkTransactionImpl(RequestProcessor requestProcessor) { this.requestProcessor = requestProcessor; } public ListenableFuture> read(LogicalDatastoreType store, InstanceIdentifier path) { return requestProcessor.read(store, path); } public void delete(LogicalDatastoreType store, InstanceIdentifier path) { requestProcessor.delete(store, path); } public void put(LogicalDatastoreType store, InstanceIdentifier path, T data, boolean createMissingParents) { requestProcessor.put(store, path, data, createMissingParents); } @Override public void put(LogicalDatastoreType store, InstanceIdentifier path, T data) { requestProcessor.put(store, path, data); } public FluentFuture commit() { return requestProcessor.commit(); } @Override public void close() { requestProcessor.close(); } public void merge(LogicalDatastoreType store, InstanceIdentifier path, T data) { requestProcessor.merge(store, path, data); } public void merge(LogicalDatastoreType store, InstanceIdentifier path, T data, boolean createMissingParents) { requestProcessor.merge(store, path, data, createMissingParents); } }