summaryrefslogtreecommitdiffstats
path: root/cps-ri
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2023-08-04 11:22:43 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2024-01-09 10:47:51 +0000
commit926d40875fecb3c11e4103dfdaf00ac615de3cdc (patch)
tree3dd976137922160419ef781ac6be34cd00441e1f /cps-ri
parent8e617d64a7725f5fb0f0f31a5c551ff3e1e484de (diff)
Remove inefficient saveListElementsBatch API
CpsDataService::saveListElementsBatch method is not needed as saveListElements supports saving multiple list elements in a single operation. This both simplifies implementation and greatly improves performance when saving list elements, as the Yang parser need only run once for the whole batch. - Change InventoryPersistence to save CM-handles in batches of 100 using existing CpsDataService::saveListElements method. - Remove not needed CpsDataService::saveListElementBatch. Issue-ID: CPS-2019 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8b74dda2917e094d064b42f2c0e4d57029b90395
Diffstat (limited to 'cps-ri')
-rw-r--r--cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java17
1 files changed, 0 insertions, 17 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
index 19547bbccf..1cfe21d3a2 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
@@ -97,23 +97,6 @@ public class CpsDataPersistenceServiceImpl implements CpsDataPersistenceService
addChildrenDataNodes(anchorEntity, parentNodeXpath, newListElements);
}
- @Override
- public void addMultipleLists(final String dataspaceName, final String anchorName, final String parentNodeXpath,
- final Collection<Collection<DataNode>> newLists) {
- final AnchorEntity anchorEntity = getAnchorEntity(dataspaceName, anchorName);
- final Collection<String> failedXpaths = new HashSet<>();
- for (final Collection<DataNode> newList : newLists) {
- try {
- addChildrenDataNodes(anchorEntity, parentNodeXpath, newList);
- } catch (final AlreadyDefinedException alreadyDefinedException) {
- failedXpaths.addAll(alreadyDefinedException.getAlreadyDefinedObjectNames());
- }
- }
- if (!failedXpaths.isEmpty()) {
- throw AlreadyDefinedException.forDataNodes(failedXpaths, anchorEntity.getName());
- }
- }
-
private void addNewChildDataNode(final AnchorEntity anchorEntity, final String parentNodeXpath,
final DataNode newChild) {
final FragmentEntity parentFragmentEntity = getFragmentEntity(anchorEntity, parentNodeXpath);