Merge "Watchdog-process that changes CM Handles state"
authorJoseph Keenan <joseph.keenan@est.tech>
Tue, 3 May 2022 08:53:36 +0000 (08:53 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 3 May 2022 08:53:36 +0000 (08:53 +0000)
1  2 
cps-service/src/main/java/org/onap/cps/spi/CpsDataPersistenceService.java

@@@ -1,6 -1,6 +1,6 @@@
  /*
   * ============LICENSE_START=======================================================
 - *  Copyright (C) 2020 Nordix Foundation.
 + *  Copyright (C) 2020-2022 Nordix Foundation.
   *  Modifications Copyright (C) 2021 Pantheon.tech
   *  Modifications Copyright (C) 2022 Bell Canada
   * ================================================================================
@@@ -23,6 -23,7 +23,7 @@@
  package org.onap.cps.spi;
  
  import java.util.Collection;
+ import java.util.List;
  import java.util.Map;
  import org.onap.cps.spi.model.DataNode;
  
@@@ -145,8 -146,8 +146,8 @@@ public interface CpsDataPersistenceServ
       *                               included in the output
       * @return the data nodes found i.e. 0 or more data nodes
       */
-     Collection<DataNode> queryDataNodes(String dataspaceName, String anchorName,
-         String cpsPath, FetchDescendantsOption fetchDescendantsOption);
+     List<DataNode> queryDataNodes(String dataspaceName, String anchorName,
+                                   String cpsPath, FetchDescendantsOption fetchDescendantsOption);
  
      /**
       * Starts a session which allows use of locks and batch interaction with the persistence service.
       * @param sessionId session ID
       */
      void closeSession(String sessionId);
 +
 +    /**
 +     * Lock anchor.
 +     * To release locks(s), the session holding the lock(s) must be closed.
 +     *
 +     * @param sessionID session ID
 +     * @param dataspaceName dataspace name
 +     * @param anchorName anchor name
 +     * @param timeoutInMilliseconds lock attempt timeout in milliseconds
 +     */
 +    void lockAnchor(String sessionID, String dataspaceName, String anchorName, Long timeoutInMilliseconds);
 +
  }