From 530d4d41f3e3deb2b6bf36e0345bdc9153c0611b Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Tue, 7 Mar 2023 20:53:04 +0000 Subject: Reduce dataspace/anchor lookups in CpsDataService - Use Anchor object instead of names in processDataUpdatedEventAsync - Use Anchor object instead of names in buildDataNodes - Avoid unnecessary ArrayList copy in updateDataNodesAndDescendants Issue-ID: CPS-1536 Signed-off-by: danielhanrahan Change-Id: I46936a655a3d151357e55b68e1c4161e07100e84 --- .../main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cps-ri/src') 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 82e6388d8b..4756991138 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 @@ -486,7 +486,7 @@ public class CpsDataPersistenceServiceImpl implements CpsDataPersistenceService @Override public void updateDataNodesAndDescendants(final String dataspaceName, final String anchorName, - final List updatedDataNodes) { + final Collection updatedDataNodes) { final AnchorEntity anchorEntity = getAnchorEntity(dataspaceName, anchorName); final Map xpathToUpdatedDataNode = updatedDataNodes.stream() -- cgit 1.2.3-korg