diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2024-01-31 10:39:45 +0000 |
---|---|---|
committer | Adheli Tavares <adheli.tavares@est.tech> | 2024-02-09 14:28:59 +0000 |
commit | eeb8a6a39d2bdd20bc54c11ac69700739d8faac1 (patch) | |
tree | b22a3a34482af847905062fb1ebeab43cab39162 /controlloop/common/eventmanager | |
parent | b0455b141643f18d5025e23ac7859da43afe7f19 (diff) |
Remove deprecated DMAAP dependency
Issue-ID: POLICY-4402
Change-Id: Id3bf1f5833b7d6086345b3747505e2f57036d4ea
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'controlloop/common/eventmanager')
3 files changed, 13 insertions, 5 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java index 3eac66112..014ccd497 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/drl/legacy/ControlLoopParams.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +21,7 @@ package org.onap.policy.controlloop.drl.legacy; +import java.io.Serial; import java.io.Serializable; import lombok.Data; import lombok.NoArgsConstructor; @@ -29,6 +31,7 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; @NoArgsConstructor public class ControlLoopParams implements Serializable { + @Serial private static final long serialVersionUID = 970755684770982776L; private String closedLoopControlName; diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java index 5a0352bfe..bb322f825 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ClEventManagerWithEvent.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +21,7 @@ package org.onap.policy.controlloop.eventmanager; +import java.io.Serial; import java.util.HashMap; import lombok.AccessLevel; import lombok.Getter; @@ -40,20 +42,20 @@ import org.slf4j.LoggerFactory; * Manager for a single control loop event. Once this has been created, the event can be * retracted from working memory. */ +@Getter public abstract class ClEventManagerWithEvent<T extends Step> extends ClEventManagerWithOutcome<T> implements StepContext { private static final Logger logger = LoggerFactory.getLogger(ClEventManagerWithEvent.class); + @Serial private static final long serialVersionUID = -1216568161322872641L; public enum NewEventStatus { FIRST_ONSET, SUBSEQUENT_ONSET, FIRST_ABATEMENT, SUBSEQUENT_ABATEMENT, SYNTAX_ERROR } - @Getter private final VirtualControlLoopEvent event; - @Getter @Setter(AccessLevel.PROTECTED) private VirtualControlLoopEvent abatement = null; 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 354567cd8..f93b2acf5 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 @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +21,7 @@ package org.onap.policy.controlloop.eventmanager; +import java.io.Serial; import java.io.Serializable; import java.time.Instant; import java.util.Deque; @@ -61,6 +63,7 @@ import org.slf4j.LoggerFactory; public class ControlLoopEventManager implements StepContext, Serializable { private static final Logger logger = LoggerFactory.getLogger(ControlLoopEventManager.class); + @Serial private static final long serialVersionUID = -1216568161322872641L; /** @@ -81,7 +84,7 @@ public class ControlLoopEventManager implements StepContext, Serializable { * otherwise. This will be {@code false} if this object is reconstituted from a * persistent store or by transfer from another server. */ - private transient boolean createdByThisJvmInstance; + private final transient boolean createdByThisJvmInstance; private final transient EventManagerServices services; @@ -115,7 +118,7 @@ public class ControlLoopEventManager implements StepContext, Serializable { /** * Set of properties used while processing the event. */ - private Map<String, Serializable> properties = new ConcurrentHashMap<>(); + private final Map<String, Serializable> properties = new ConcurrentHashMap<>(); /** * Unprocessed outcomes from the operations. Outcomes are added to this each time the @@ -192,7 +195,7 @@ public class ControlLoopEventManager implements StepContext, Serializable { */ private long detmControlLoopTimeoutMs() { // validation checks preclude null or 0 timeout values in the policy - Integer timeout = processor.getPolicy().getProperties().getTimeout(); + int timeout = processor.getPolicy().getProperties().getTimeout(); return TimeUnit.MILLISECONDS.convert(timeout, TimeUnit.SECONDS); } |