Split DistributedShardRegistration into its own file
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / sharding / DistributedShardRegistration.java
diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardRegistration.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardRegistration.java
new file mode 100644 (file)
index 0000000..0f94bc5
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.cluster.sharding;
+
+import com.google.common.annotations.Beta;
+import java.util.concurrent.CompletionStage;
+
+/**
+ * Registration of the CDS shard that allows you to remove the shard from the system by closing the registration.
+ * This removal is done asynchronously.
+ */
+@Beta
+public interface DistributedShardRegistration {
+
+    /**
+     *  Removes the shard from the system, this removal is done asynchronously, the future completes once the
+     *  backend shard is no longer present.
+     */
+    CompletionStage<Void> close();
+}