Implementation for StorageAdmin and PartitionAdmin APIs
Change-Id: I48cbfae6f410425294196884cdb2ce4705fa2c3d
diff --git a/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveCreator.java b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveCreator.java
index 08c2dbb..c8ba0eb 100644
--- a/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveCreator.java
+++ b/core/api/src/main/java/org/onosproject/store/primitives/DistributedPrimitiveCreator.java
@@ -15,6 +15,8 @@
*/
package org.onosproject.store.primitives;
+import java.util.Set;
+
import org.onosproject.store.service.AsyncAtomicCounter;
import org.onosproject.store.service.AsyncAtomicValue;
import org.onosproject.store.service.AsyncConsistentMap;
@@ -84,4 +86,16 @@
* @return leader elector
*/
AsyncLeaderElector newAsyncLeaderElector(String name);
+
+ /**
+ * Returns the names of all created {@code AsyncConsistentMap} instances.
+ * @return set of {@code AsyncConsistentMap} names
+ */
+ Set<String> getAsyncConsistentMapNames();
+
+ /**
+ * Returns the names of all created {@code AsyncAtomicCounter} instances.
+ * @return set of {@code AsyncAtomicCounter} names
+ */
+ Set<String> getAsyncAtomicCounterNames();
}
\ No newline at end of file
diff --git a/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java b/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java
index af7e164..04d8e99 100644
--- a/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java
+++ b/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java
@@ -15,9 +15,11 @@
*/
package org.onosproject.store.primitives;
+import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.onosproject.cluster.PartitionId;
+import org.onosproject.store.service.PartitionInfo;
/**
* Administrative interface for partition membership changes.
@@ -25,6 +27,12 @@
public interface PartitionAdminService {
/**
+ * Returns the {@link PartitionInfo information} for existing partitions.
+ * @return list of {@code PartitionInfo}
+ */
+ List<PartitionInfo> partitionInfo();
+
+ /**
* Leaves a partition.
*
* @param partitionId partition identifier
diff --git a/core/api/src/main/java/org/onosproject/store/service/StorageAdminService.java b/core/api/src/main/java/org/onosproject/store/service/StorageAdminService.java
index 1e9a36e..4718bb8 100644
--- a/core/api/src/main/java/org/onosproject/store/service/StorageAdminService.java
+++ b/core/api/src/main/java/org/onosproject/store/service/StorageAdminService.java
@@ -31,6 +31,7 @@
*
* @return list of partition information
*/
+ @Deprecated
List<PartitionInfo> getPartitionInfo();
/**
@@ -38,6 +39,7 @@
*
* @return list of map information
*/
+ @Deprecated
List<MapInfo> getMapInfo();
/**
@@ -47,6 +49,7 @@
*
* @return mapping from counter name to that counter's next value
*/
+ @Deprecated
Map<String, Long> getCounters();
/**
@@ -54,6 +57,7 @@
*
* @return mapping from counter name to that counter's next value
*/
+ @Deprecated
Map<String, Long> getPartitionedDatabaseCounters();
/**
@@ -61,6 +65,7 @@
*
* @return mapping from counter name to that counter's next value
*/
+ @Deprecated
Map<String, Long> getInMemoryDatabaseCounters();
/**