diff options
author | 2024-06-10 17:08:04 +0100 | |
---|---|---|
committer | 2024-06-11 09:57:17 +0100 | |
commit | c616ee76ee72202bdf485de86b53a92837620c38 (patch) | |
tree | cf85106d3ac1f749616a90e160e1c90cc3c4f5fa /models/src/main | |
parent | a48f784beca5e7aa189217c52cfa83452cf8fc47 (diff) |
Add Synchronization topic in acm runtime
New sync topic for acm-ppnt synchronization
Added publisher for the sync topic
Refactor MessageDispatcherActivator for processing more than one topic
parameter.
Issue-ID: POLICY-5030
Change-Id: Id765b433beaf3f51fad9a9c66403a93d21c33797
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Diffstat (limited to 'models/src/main')
3 files changed, 63 insertions, 3 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantMessageType.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantMessageType.java index 29c2c01bd..e6e42e851 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantMessageType.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantMessageType.java @@ -110,5 +110,10 @@ public enum ParticipantMessageType { * Used by acm runtime to migrate from a composition to another one in participants, triggers a * AUTOMATION_COMPOSITION_MIGRATION message with result of AUTOMATION_COMPOSITION_STATE_CHANGE operation. */ - AUTOMATION_COMPOSITION_MIGRATION + AUTOMATION_COMPOSITION_MIGRATION, + + /** + * Used by runtime to send composition and instances to sync participant replicas. + */ + PARTICIPANT_SYNC_MSG } diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantRestart.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantRestart.java index 103be6891..119cdf030 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantRestart.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantRestart.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023,2024 Nordix Foundation. + * Copyright (C) 2023-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. @@ -41,7 +41,7 @@ public class ParticipantRestart extends ParticipantMessage { // element definition private List<ParticipantDefinition> participantDefinitionUpdates = new ArrayList<>(); - // automationcomposition instances list + // automation composition instances list private List<ParticipantRestartAc> automationcompositionList = new ArrayList<>(); /** @@ -52,6 +52,14 @@ public class ParticipantRestart extends ParticipantMessage { } /** + * Constructor with message type. + * @param messageType messageType + */ + public ParticipantRestart(ParticipantMessageType messageType) { + super(messageType); + } + + /** * Constructs the object, making a deep copy. * * @param source source from which to copy diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantSync.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantSync.java new file mode 100644 index 000000000..33a730941 --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantSync.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.clamp.models.acm.messages.kafka.participant; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +@Getter +@Setter +@ToString(callSuper = true) +public class ParticipantSync extends ParticipantRestart { + + /** + * Constructor. + */ + public ParticipantSync() { + super(ParticipantMessageType.PARTICIPANT_SYNC_MSG); + } + + /** + * Constructs the object, making a deep copy. + * + * @param source source from which to copy + */ + public ParticipantSync(ParticipantSync source) { + super(source); + } +} |