- public DataNode getDataNode(final String dataspaceName, final String anchorName, final String xpath,
- final FetchDescendantsOption fetchDescendantsOption) {
- CpsValidator.validateNameCharacters(dataspaceName, anchorName);
- return cpsDataPersistenceService.getDataNode(dataspaceName, anchorName, xpath, fetchDescendantsOption);
+ @Timed(value = "cps.data.service.datanode.get",
+ description = "Time taken to get data nodes for an xpath")
+ public Collection<DataNode> getDataNodes(final String dataspaceName, final String anchorName,
+ final String xpath,
+ final FetchDescendantsOption fetchDescendantsOption) {
+ cpsValidator.validateNameCharacters(dataspaceName, anchorName);
+ return cpsDataPersistenceService.getDataNodes(dataspaceName, anchorName, xpath, fetchDescendantsOption);
+ }
+
+ @Override
+ @Timed(value = "cps.data.service.datanode.batch.get",
+ description = "Time taken to get a batch of data nodes")
+ public Collection<DataNode> getDataNodesForMultipleXpaths(final String dataspaceName, final String anchorName,
+ final Collection<String> xpaths,
+ final FetchDescendantsOption fetchDescendantsOption) {
+ cpsValidator.validateNameCharacters(dataspaceName, anchorName);
+ return cpsDataPersistenceService.getDataNodesForMultipleXpaths(dataspaceName, anchorName, xpaths,
+ fetchDescendantsOption);