aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java')
-rw-r--r--controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java23
1 files changed, 9 insertions, 14 deletions
diff --git a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java
index 66a975024..93f204df3 100644
--- a/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java
+++ b/controlloop/common/feature-controlloop-trans/src/main/java/org/onap/policy/drools/apps/controlloop/feature/trans/CacheBasedControlLoopMetricsManager.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -166,16 +167,10 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics {
setNotificationValues(controller, notification);
switch (notification.getNotification()) {
- case REJECTED:
- case FINAL_FAILURE:
- case FINAL_SUCCESS:
- case FINAL_OPENLOOP:
+ case REJECTED, FINAL_FAILURE, FINAL_SUCCESS, FINAL_OPENLOOP:
endTransaction(controller, notification);
break;
- case ACTIVE:
- case OPERATION:
- case OPERATION_SUCCESS:
- case OPERATION_FAILURE:
+ case ACTIVE, OPERATION, OPERATION_SUCCESS, OPERATION_FAILURE:
/* any other value is an in progress transaction */
inProgressTransaction(notification);
break;
@@ -358,14 +353,14 @@ class CacheBasedControlLoopMetricsManager implements ControlLoopMetrics {
.setEndTime(notification.getNotificationTime().toInstant());
switch (notification.getNotification()) {
- case FINAL_OPENLOOP:
- /* fall through */
- case FINAL_SUCCESS:
+ case FINAL_OPENLOOP,
+ /* fall through */
+ FINAL_SUCCESS:
trans.setStatusCode(true);
break;
- case FINAL_FAILURE:
- /* fall through */
- case REJECTED:
+ case FINAL_FAILURE,
+ /* fall through */
+ REJECTED:
trans.setStatusCode(false);
break;
default: