BUG-5280: introduce cookie in LocalHistoryIdentifier
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / DistributedDataStoreClient.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 java.util.concurrent.CompletionStage;
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  * Keep this interface as clean as possible, as it needs to be implemented in thread-safe and highly-efficient manner.
20  *
21  * @author Robert Varga
22  */
23 @Beta
24 public interface DistributedDataStoreClient extends Identifiable<ClientIdentifier>, AutoCloseable {
25     @Override
26     ClientIdentifier getIdentifier();
27
28     @Override
29     void close();
30
31     /**
32      * Create a new local history. This method initiates an asynchronous instantiation of a local history on the back
33      * end. ClientLocalHistory represents the interface exposed to the client.
34      *
35      * @return Future client history handle
36      */
37     CompletionStage<ClientLocalHistory> createLocalHistory();
38
39     // TODO: add methods required by DistributedDataStore
40
41 }