aboutsummaryrefslogtreecommitdiffstats
path: root/models/src/main
diff options
context:
space:
mode:
authorAdheli Tavares <adheli.tavares@est.tech>2024-06-11 09:32:45 +0000
committerGerrit Code Review <gerrit@onap.org>2024-06-11 09:32:45 +0000
commitb174e37eb1a41e9997c9455edacc36667e0c5c1a (patch)
treeed036f27b4ae9c7b2301bcf24d4412fdbd555733 /models/src/main
parenta35b7acb63a5990293231d30ff6efbe046267f3e (diff)
parentc616ee76ee72202bdf485de86b53a92837620c38 (diff)
Merge "Add Synchronization topic in acm runtime"
Diffstat (limited to 'models/src/main')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantMessageType.java7
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantRestart.java12
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/kafka/participant/ParticipantSync.java47
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);
+ }
+}