Fix remaining CS warnings in sal-distributed-datastore
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / DistributedDataStoreClient.java
index 82c839e4380f8bc8311524a5f65dc9e2a8956042..273fd89919848a824b3945b03617ca7c07cf76ee 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.controller.cluster.databroker.actors.dds;
 
 import com.google.common.annotations.Beta;
-import java.util.concurrent.CompletionStage;
+import javax.annotation.Nonnull;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.yangtools.concepts.Identifiable;
 
@@ -16,6 +16,7 @@ import org.opendaylight.yangtools.concepts.Identifiable;
  * Client interface for interacting with the frontend actor. This interface is the primary access point through
  * which the DistributedDataStore frontend interacts with backend Shards.
  *
+ * <p>
  * Keep this interface as clean as possible, as it needs to be implemented in thread-safe and highly-efficient manner.
  *
  * @author Robert Varga
@@ -23,19 +24,22 @@ import org.opendaylight.yangtools.concepts.Identifiable;
 @Beta
 public interface DistributedDataStoreClient extends Identifiable<ClientIdentifier>, AutoCloseable {
     @Override
-    ClientIdentifier getIdentifier();
+    @Nonnull ClientIdentifier getIdentifier();
 
     @Override
     void close();
 
     /**
-     * Create a new local history. This method initiates an asynchronous instantiation of a local history on the back
-     * end. ClientLocalHistory represents the interface exposed to the client.
+     * Create a new local history. ClientLocalHistory represents the interface exposed to the client.
      *
-     * @return Future client history handle
+     * @return Client history handle
      */
-    CompletionStage<ClientLocalHistory> createLocalHistory();
-
-    // TODO: add methods required by DistributedDataStore
+    @Nonnull ClientLocalHistory createLocalHistory();
 
+    /**
+     * Create a new free-standing transaction.
+     *
+     * @return Client transaction handle
+     */
+    @Nonnull ClientTransaction createTransaction();
 }