summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java17
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java14
2 files changed, 16 insertions, 15 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
index 93535efc1..5241bd2fc 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
@@ -29,8 +29,8 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.UUID;
import java.util.NoSuchElementException;
+import java.util.UUID;
import org.onap.policy.aai.AaiGetVnfResponse;
import org.onap.policy.aai.AaiGetVserverResponse;
@@ -91,7 +91,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
private static final long serialVersionUID = -1216568161322872641L;
public final String closedLoopControlName;
- public final UUID requestID;
+ private final UUID requestId;
private String controlLoopResult;
private ControlLoopProcessor processor = null;
@@ -125,9 +125,9 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
requiredAAIKeys.add(VM_NAME);
}
- public ControlLoopEventManager(String closedLoopControlName, UUID requestID) {
+ public ControlLoopEventManager(String closedLoopControlName, UUID requestId) {
this.closedLoopControlName = closedLoopControlName;
- this.requestID = requestID;
+ this.requestId = requestId;
}
public String getClosedLoopControlName() {
@@ -187,7 +187,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
}
public UUID getRequestID() {
- return requestID;
+ return requestId;
}
/**
@@ -499,7 +499,8 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
this.currentOperation.getTargetEntity(),
this.onset.getRequestId(), this);
this.targetLock = lock;
- LockResult<GuardResult, TargetLock> lockResult = LockResult.createLockResult(GuardResult.LOCK_ACQUIRED, lock);
+ LockResult<GuardResult, TargetLock> lockResult =
+ LockResult.createLockResult(GuardResult.LOCK_ACQUIRED, lock);
return lockResult;
}
//
@@ -637,7 +638,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
logger.error("{}: commitAbatement: no operation manager", this);
return;
}
- try{
+ try {
this.lastOperationManager.commitAbatement(message,outcome);
} catch (NoSuchElementException e) {
logger.error("{}: commitAbatement threw an exception ", this, e);
@@ -1027,7 +1028,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
@Override
public String toString() {
- return "ControlLoopEventManager [closedLoopControlName=" + closedLoopControlName + ", requestID=" + requestID
+ return "ControlLoopEventManager [closedLoopControlName=" + closedLoopControlName + ", requestId=" + requestId
+ ", processor=" + processor + ", onset=" + (onset != null ? onset.getRequestId() : "null")
+ ", numOnsets=" + numOnsets + ", numAbatements=" + numAbatements + ", isActivated=" + isActivated
+ ", currentOperation=" + currentOperation + ", targetLock=" + targetLock + "]";
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
index 466c826b1..c5344e38b 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
@@ -41,11 +41,11 @@ import org.onap.policy.controlloop.ControlLoopEvent;
import org.onap.policy.controlloop.ControlLoopException;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
-import org.onap.policy.controlloop.actor.appc.APPCActorServiceProvider;
+import org.onap.policy.controlloop.actor.appc.AppcActorServiceProvider;
import org.onap.policy.controlloop.actor.appclcm.AppcLcmActorServiceProvider;
import org.onap.policy.controlloop.actor.sdnr.SdnrActorServiceProvider;
-import org.onap.policy.controlloop.actor.so.SOActorServiceProvider;
-import org.onap.policy.controlloop.actor.vfc.VFCActorServiceProvider;
+import org.onap.policy.controlloop.actor.so.SoActorServiceProvider;
+import org.onap.policy.controlloop.actor.vfc.VfcActorServiceProvider;
import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.drools.system.PolicyEngine;
@@ -258,7 +258,7 @@ public class ControlLoopOperationManager implements Serializable {
*/
this.currentOperation = operation;
if ("ModifyConfig".equalsIgnoreCase(policy.getRecipe())) {
- this.operationRequest = APPCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
+ this.operationRequest = AppcActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy, this.targetEntity);
} else {
this.operationRequest = AppcLcmActorServiceProvider.constructRequest(
@@ -270,7 +270,7 @@ public class ControlLoopOperationManager implements Serializable {
return operationRequest;
case "SO":
- SOActorServiceProvider soActorSp = new SOActorServiceProvider();
+ SoActorServiceProvider soActorSp = new SoActorServiceProvider();
this.operationRequest = soActorSp.constructRequest((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy, eventManager.getNqVserverFromAai());
@@ -283,7 +283,7 @@ public class ControlLoopOperationManager implements Serializable {
return operationRequest;
case "VFC":
- this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
+ this.operationRequest = VfcActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy, this.eventManager.getVnfResponse());
this.currentOperation = operation;
if (this.operationRequest == null) {
@@ -935,5 +935,5 @@ public class ControlLoopOperationManager implements Serializable {
// Clear the current operation field
//
this.currentOperation = null;
- }
+ }
}