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.base.Optional;
12 import com.google.common.util.concurrent.CheckedFuture;
13 import com.google.common.util.concurrent.ListenableFuture;
15 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
16 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
17 import org.opendaylight.yangtools.yang.binding.DataObject;
18 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
22 public interface NetworkTransactionService {
24 <T extends DataObject> CheckedFuture<Optional<T>, ReadFailedException> 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 ListenableFuture<Void> submit();