aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/StepContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/StepContext.java')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/StepContext.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/StepContext.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/StepContext.java
index 5251b7acc..319cc64a9 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/StepContext.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/StepContext.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,4 +69,17 @@ public interface StepContext {
* @return a future that can be used to await the lock
*/
public CompletableFuture<OperationOutcome> requestLock(String targetEntity);
+
+ /**
+ * Releases a lock.
+ * <p/>
+ * Note: once this has been invoked, whether or not the "release" operation succeeds,
+ * subsequent calls to {@link #requestLock(String)} for the same target entity may
+ * always fail, and subsequent calls to {@link #releaseLock(String)} may always
+ * succeed, depending on the implementation.
+ *
+ * @param targetEntity entity to be locked
+ * @return a future that can be used to await the release operation
+ */
+ public CompletableFuture<OperationOutcome> releaseLock(String targetEntity);
}