2 * Copyright © 2017 AT&T, 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
9 package org.opendaylight.transportpce.common.network;
11 import com.google.common.util.concurrent.FluentFuture;
12 import com.google.common.util.concurrent.ListenableFuture;
13 import java.util.Optional;
14 import org.eclipse.jdt.annotation.NonNull;
15 import org.opendaylight.mdsal.common.api.CommitInfo;
16 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
17 import org.opendaylight.yangtools.yang.binding.DataObject;
18 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
22 public interface NetworkTransactionService {
24 <T extends DataObject> ListenableFuture<Optional<T>> read(LogicalDatastoreType store,
25 InstanceIdentifier<T> path);
27 void delete(LogicalDatastoreType store, InstanceIdentifier<?> path);
29 <T extends DataObject> void put(LogicalDatastoreType store, InstanceIdentifier<T> path, T data,
30 boolean createMissingParents);
33 <T extends DataObject> void put(LogicalDatastoreType store, InstanceIdentifier<T> path,T data);
35 <T extends DataObject> void merge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data);
37 <T extends DataObject> void merge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data,
38 boolean createMissingParents);
40 FluentFuture<? extends @NonNull CommitInfo> commit();