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.binding.api.DataBroker;
16 import org.opendaylight.mdsal.common.api.CommitInfo;
17 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
18 import org.opendaylight.yangtools.yang.binding.DataObject;
19 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
23 public interface NetworkTransactionService {
25 <T extends DataObject> ListenableFuture<Optional<T>> read(LogicalDatastoreType store,
26 InstanceIdentifier<T> path);
28 void delete(LogicalDatastoreType store, InstanceIdentifier<?> path);
30 <T extends DataObject> void put(LogicalDatastoreType store, InstanceIdentifier<T> path,T data);
32 <T extends DataObject> void merge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data);
34 FluentFuture<? extends @NonNull CommitInfo> commit();
39 * the Databroker related to NetworkTransactionService.
40 * @return the Databroker related to NetworkTransactionService.
42 DataBroker getDataBroker();