Improve LocalProxyTransaction.doExists()
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / DataStoreClient.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, 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 package org.opendaylight.controller.cluster.databroker.actors.dds;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
13 import org.opendaylight.yangtools.concepts.Identifiable;
14
15 /**
16  * Client interface for interacting with the frontend actor. This interface is the primary access point through
17  * which the DistributedDataStore frontend interacts with backend Shards.
18  *
19  * <p>
20  * Keep this interface as clean as possible, as it needs to be implemented in thread-safe and highly-efficient manner.
21  *
22  * @author Robert Varga
23  */
24 @Beta
25 @NonNullByDefault
26 public interface DataStoreClient extends Identifiable<ClientIdentifier>, AutoCloseable {
27     @Override
28     void close();
29
30     /**
31      * Create a new local history. ClientLocalHistory represents the interface exposed to the client.
32      *
33      * @return Client history handle
34      */
35     ClientLocalHistory createLocalHistory();
36
37     /**
38      * Create a new free-standing snapshot.
39      *
40      * @return Client snapshot handle
41      */
42     ClientSnapshot createSnapshot();
43
44     /**
45      * Create a new free-standing transaction.
46      *
47      * @return Client transaction handle
48      */
49     ClientTransaction createTransaction();
50 }