Improve batch delete schemasets performance
[cps.git] / cps-service / src / main / java / org / onap / cps / api / CpsAdminService.java
index b0e68cf..fcf3f54 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2020-2022 Nordix Foundation
+ *  Copyright (C) 2020-2023 Nordix Foundation
  *  Modifications Copyright (C) 2020-2022 Bell Canada.
  *  Modifications Copyright (C) 2021 Pantheon.tech
  *  Modifications Copyright (C) 2022 TechMahindra Ltd.
@@ -84,7 +84,7 @@ public interface CpsAdminService {
     Collection<Anchor> getAnchors(String dataspaceName);
 
     /**
-     * Read all anchors associated the given schema-set in the given dataspace.
+     * Read all anchors associated with the given schema-set in the given dataspace.
      *
      * @param dataspaceName dataspace name
      * @param schemaSetName schema-set name
@@ -92,6 +92,15 @@ public interface CpsAdminService {
      */
     Collection<Anchor> getAnchors(String dataspaceName, String schemaSetName);
 
+    /**
+     * Read all anchors associated with the given schema-sets in the given dataspace.
+     *
+     * @param dataspaceName  dataspace name
+     * @param schemaSetNames schema-set names
+     * @return a collection of anchors
+     */
+    Collection<Anchor> getAnchors(String dataspaceName, Collection<String> schemaSetNames);
+
     /**
      * Get an anchor in the given dataspace using the anchor name.
      *
@@ -109,6 +118,14 @@ public interface CpsAdminService {
      */
     void deleteAnchor(String dataspaceName, String anchorName);
 
+    /**
+     * Delete anchors by name in given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorNames   anchor names
+     */
+    void deleteAnchors(String dataspaceName, Collection<String> anchorNames);
+
     /**
      * Query anchor names for the given module names in the provided dataspace.
      *