diff options
Diffstat (limited to 'models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts')
12 files changed, 694 insertions, 0 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatistics.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatistics.java new file mode 100644 index 000000000..4ef9bdcd9 --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatistics.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +import java.io.Serializable; +import java.time.Instant; +import java.util.UUID; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.ToString; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; + +@NoArgsConstructor +@Data +@ToString +public class ClElementStatistics implements Serializable { + + private static final long serialVersionUID = 3284285693112271055L; + + @NonNull + private UUID id = UUID.randomUUID(); + + @NonNull + private ToscaConceptIdentifier participantId; + + @NonNull + private Instant timeStamp; + + @NonNull + private ControlLoopState controlLoopState; + + private long clElementUptime; + +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsList.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsList.java new file mode 100644 index 000000000..166f1e48f --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ClElementStatisticsList.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +@Getter +@Setter +@ToString +public class ClElementStatisticsList { + private List<ClElementStatistics> clElementStatistics; +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoop.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoop.java new file mode 100644 index 000000000..d0d79274c --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoop.java @@ -0,0 +1,113 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.stream.Collectors; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import org.apache.commons.collections4.MapUtils; +import org.onap.policy.models.base.PfConceptKey; +import org.onap.policy.models.base.PfUtils; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity; + +/** + * Class to represent a control loop instance. + */ +@NoArgsConstructor +@Data +@EqualsAndHashCode(callSuper = true) +public class ControlLoop extends ToscaEntity implements Comparable<ControlLoop> { + @NonNull + private ToscaConceptIdentifier definition = new ToscaConceptIdentifier(PfConceptKey.getNullKey()); + + @NonNull + private ControlLoopState state = ControlLoopState.UNINITIALISED; + + @NonNull + private ControlLoopOrderedState orderedState = ControlLoopOrderedState.UNINITIALISED; + + private Map<UUID, ControlLoopElement> elements; + + @Override + public String getType() { + return definition.getName(); + } + + @Override + public String getTypeVersion() { + return definition.getVersion(); + } + + /** + * Copy contructor, does a deep copy. + * + * @param otherControlLoop the other element to copy from + */ + public ControlLoop(final ControlLoop otherControlLoop) { + super(otherControlLoop); + this.definition = new ToscaConceptIdentifier(otherControlLoop.definition); + this.state = otherControlLoop.state; + this.orderedState = otherControlLoop.orderedState; + this.elements = PfUtils.mapMap(otherControlLoop.elements, ControlLoopElement::new); + } + + @Override + public int compareTo(final ControlLoop other) { + return compareNameVersion(this, other); + } + + /** + * Set the ordered state on the control loop and on all its control loop elements. + * + * @param orderedState the state we want the control loop to transition to + */ + public void setCascadedOrderedState(final ControlLoopOrderedState orderedState) { + this.orderedState = orderedState; + + if (MapUtils.isEmpty(elements)) { + return; + } + + elements.values().forEach(element -> element.setOrderedState(orderedState)); + } + + /** + * Get a list of control loop element statistics. + * + * @param controlLoop the control loop + * @return List of ClElementStatistics + */ + public List<ClElementStatistics> getControlLoopElementStatisticsList(final ControlLoop controlLoop) { + if (MapUtils.isEmpty(controlLoop.elements)) { + return null; + } + + return controlLoop.elements.values().stream().map(ControlLoopElement::getClElementStatistics) + .collect(Collectors.toList()); + } +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java new file mode 100644 index 000000000..83f062c74 --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopElement.java @@ -0,0 +1,75 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +import java.util.UUID; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.ToString; +import org.onap.policy.models.base.PfConceptKey; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; + +/** + * Class to represent a control loop instance. + */ +@NoArgsConstructor +@Data +@ToString +public class ControlLoopElement { + @NonNull + private UUID id = UUID.randomUUID(); + + @NonNull + private ToscaConceptIdentifier definition = new ToscaConceptIdentifier(PfConceptKey.getNullKey()); + + @NonNull + private ToscaConceptIdentifier participantType = new ToscaConceptIdentifier(PfConceptKey.getNullKey()); + + @NonNull + private ToscaConceptIdentifier participantId = new ToscaConceptIdentifier(PfConceptKey.getNullKey()); + + @NonNull + private ControlLoopState state = ControlLoopState.UNINITIALISED; + + @NonNull + private ControlLoopOrderedState orderedState = ControlLoopOrderedState.UNINITIALISED; + + private String description; + + private ClElementStatistics clElementStatistics; + + /** + * Copy constructor, does a deep copy but as all fields here are immutable, it's just a regular copy. + * + * @param otherElement the other element to copy from + */ + public ControlLoopElement(final ControlLoopElement otherElement) { + this.id = otherElement.id; + this.definition = new ToscaConceptIdentifier(otherElement.definition); + this.participantType = new ToscaConceptIdentifier(otherElement.participantType); + this.participantId = new ToscaConceptIdentifier(otherElement.participantId); + this.state = otherElement.state; + this.orderedState = otherElement.orderedState; + this.description = otherElement.description; + this.clElementStatistics = otherElement.clElementStatistics; + } +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopOrderedState.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopOrderedState.java new file mode 100644 index 000000000..91f90275e --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopOrderedState.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +public enum ControlLoopOrderedState { + /** + * The control loop or control loop element should become uninitialised on participants, it should not exist on + * participants. + */ + UNINITIALISED, + /** + * The control loop or control loop element should initialised on the participants and be passive, that is, it is + * not handling control loop messages yet. + */ + PASSIVE, + /** The control loop or control loop element should running and is executing control loops. */ + RUNNING; + + public boolean equalsControlLoopState(final ControlLoopState controlLoopState) { + return this.name().equals(controlLoopState.name()); + } + + public ControlLoopState asState() { + return ControlLoopState.valueOf(this.name()); + } +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopState.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopState.java new file mode 100644 index 000000000..ff0d553af --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopState.java @@ -0,0 +1,63 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +public enum ControlLoopState { + /** + * The control loop or control loop element is not initialised on participants, it does not exist on participants. + */ + UNINITIALISED, + /** + * The control loop or control loop element is changing from unitialised to passive, it is being initialised onto + * participants. + */ + UNINITIALISED2PASSIVE, + /** + * The control loop or control loop element is initialised on the participants but is passive, that is, it is not + * handling control loop messages yet. + */ + PASSIVE, + /** + * The control loop or control loop element is changing from passive to running, the participants are preparing to + * execute control loops. + */ + PASSIVE2RUNNING, + /** The control loop or control loop element is running and is executing control loops. */ + RUNNING, + /** + * The control loop or control loop element is completing execution of current control loops but will not start + * running any more control loops and will become passive. + */ + RUNNING2PASSIVE, + /** + * The control loop or control loop element is changing from passive to unitialised, the control loop is being + * removed from participants. + */ + PASSIVE2UNINITIALISED; + + public boolean equalsControlLoopOrderedState(final ControlLoopOrderedState controlLoopOrderedState) { + return this.name().equals(controlLoopOrderedState.name()); + } + + public ControlLoopOrderedState asOrderedState() { + return ControlLoopOrderedState.valueOf(this.name()); + } +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoops.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoops.java new file mode 100644 index 000000000..8edcc3c11 --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoops.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.clamp.controlloop.models.controlloop.concepts; + +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import org.onap.policy.models.base.PfUtils; + +@Getter +@Setter +@ToString +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode +public class ControlLoops { + private List<ControlLoop> controlLoopList; + + /** + * Copy contructor, does a deep copy. + * + * @param otherControlLoops the other element to copy from + */ + public ControlLoops(final ControlLoops otherControlLoops) { + this.controlLoopList = PfUtils.mapList(controlLoopList, ControlLoop::new); + } +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/Participant.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/Participant.java new file mode 100644 index 000000000..3130b6c2f --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/Participant.java @@ -0,0 +1,73 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import org.onap.policy.models.base.PfConceptKey; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaEntity; + +/** + * Class to represent details of a running participant instance. + */ +@NoArgsConstructor +@Data +@EqualsAndHashCode(callSuper = true) +public class Participant extends ToscaEntity implements Comparable<Participant> { + @NonNull + private ToscaConceptIdentifier definition = new ToscaConceptIdentifier(PfConceptKey.getNullKey()); + + @NonNull + private ParticipantState participantState = ParticipantState.UNKNOWN; + + @NonNull + private ParticipantHealthStatus healthStatus = ParticipantHealthStatus.UNKNOWN; + + @Override + public String getType() { + return definition.getName(); + } + + @Override + public String getTypeVersion() { + return definition.getVersion(); + } + + @Override + public int compareTo(final Participant other) { + return compareNameVersion(this, other); + } + + /** + * Copy constructor. + * + * @param otherParticipant the participant to copy from + */ + public Participant(Participant otherParticipant) { + super(otherParticipant); + this.definition = new ToscaConceptIdentifier(otherParticipant.definition); + this.participantState = otherParticipant.participantState; + this.healthStatus = otherParticipant.healthStatus; + } +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantHealthStatus.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantHealthStatus.java new file mode 100644 index 000000000..0cf41c9cd --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantHealthStatus.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +/** + * Class to hold the possible values for health status of Participant. + */ +public enum ParticipantHealthStatus { + + /** + * Participant is healthy and working fine. + */ + HEALTHY, + + /** + * Participant is not healthy. + */ + NOT_HEALTHY, + + /** + * Participant is currently under test state and performing tests. + */ + TEST_IN_PROGRESS, + + /** + * The health status of the Participant is unknown. + */ + UNKNOWN +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantState.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantState.java new file mode 100644 index 000000000..1af32660d --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantState.java @@ -0,0 +1,61 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +/** + * Class to hold the possible values for mode of participant. + */ +public enum ParticipantState { + + /** + * Control Loop execution is unknown. + */ + UNKNOWN, + + /** + * Control Loop execution is always rejected. + */ + PASSIVE, + + /** + * Control Loop execution execution proceeds, but changes to domain state or context are not carried out. The + * participant returns an indication that it is running in SAFE mode together with the action it would have + * performed if it was operating in ACTIVE mode. + */ + SAFE, + + /** + * Control Loop execution execution proceeds and changes to domain and state are carried out in a test environment. + * The participant returns an indication that it is running in TEST mode together with the action it has performed + * on the test environment. + */ + TEST, + + /** + * Control Loop execution execution is executed in the live environment by the participant. + */ + ACTIVE, + + /** + * Control Loop execution execution is terminated and not available. + */ + TERMINATED +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatistics.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatistics.java new file mode 100644 index 000000000..3a7b21fa1 --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatistics.java @@ -0,0 +1,52 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +import java.io.Serializable; +import java.time.Instant; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.ToString; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; + +@NoArgsConstructor +@Data +@ToString +public class ParticipantStatistics implements Serializable { + private static final long serialVersionUID = 744036598792333124L; + + + @NonNull + private ToscaConceptIdentifier participantId; + + @NonNull + private Instant timeStamp; + + private ParticipantState state; + private ParticipantHealthStatus healthStatus; + private long eventCount; + private long lastExecutionTime; + private double averageExecutionTime; + private long upTime; + private long lastEnterTime; + private long lastStart; +} diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsList.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsList.java new file mode 100644 index 000000000..a69f96f85 --- /dev/null +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ParticipantStatisticsList.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2021 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.controlloop.models.controlloop.concepts; + +import java.util.List; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +@Getter +@Setter +@ToString +public class ParticipantStatisticsList { + private List<ParticipantStatistics> statisticsList; +} |