diff options
author | 2022-08-26 13:26:01 +0100 | |
---|---|---|
committer | 2022-08-29 15:15:54 +0100 | |
commit | 91d66108379d7cd397aedc30da4801d20643ee68 (patch) | |
tree | 63c73329d3478b641b479d56fb31e8d2e10c31be /cps-ri/src/main/java/org | |
parent | bf1fdbdeed0ba6f0e8420d15ab33d6c88a5ee4d5 (diff) |
Performance Improvement:save cmhandles capability
- add saveCmHandleBatch in InventoryPersistence
- add saveListElementsBatch in CpsDataService
- have addListElementsBatch in CpsDataPersistenceService
- Test scenarios for the same
Issue-ID: CPS-1229
Issue-ID: CPS-1126
Change-Id: I0a1401818da5a4e523d7d0751cac6a526d1611b2
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ri/src/main/java/org')
-rw-r--r-- | cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java | 10 |
1 files changed, 10 insertions, 0 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 c4a2c2fe9..61e1d5b56 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 @@ -101,6 +101,16 @@ public class CpsDataPersistenceServiceImpl implements CpsDataPersistenceService addChildDataNodes(dataspaceName, anchorName, parentNodeXpath, newListElements); } + @Override + @Transactional + public void addListElementsBatch(final String dataspaceName, final String anchorName, final String parentNodeXpath, + final Collection<Collection<DataNode>> newListsElements) { + + newListsElements.forEach( + newListElement -> addListElements(dataspaceName, anchorName, parentNodeXpath, newListElement)); + + } + private void addChildDataNodes(final String dataspaceName, final String anchorName, final String parentNodeXpath, final Collection<DataNode> newChildren) { final FragmentEntity parentFragmentEntity = getFragmentByXpath(dataspaceName, anchorName, parentNodeXpath); |