Remove close method from RequestProcessor
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / network / NetworkTransactionService.java
1 /*
2  * Copyright © 2017 AT&T, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.transportpce.common.network;
10
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;
20
21
22
23 public interface NetworkTransactionService {
24
25     <T extends DataObject> ListenableFuture<Optional<T>> read(LogicalDatastoreType store,
26                                                                                 InstanceIdentifier<T> path);
27
28     void delete(LogicalDatastoreType store, InstanceIdentifier<?> path);
29
30     <T extends DataObject> void put(LogicalDatastoreType store, InstanceIdentifier<T> path,T data);
31
32     <T extends DataObject> void merge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data);
33
34     FluentFuture<? extends @NonNull CommitInfo> commit();
35
36     /**
37      * the Databroker related to NetworkTransactionService.
38      * @return the Databroker related to NetworkTransactionService.
39      */
40     DataBroker getDataBroker();
41 }