2 * Copyright © 2018-2019 AT&T Intellectual Property.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization
19 import java.io.Serializable
21 object MessageActionConstants {
22 const val PRIORITIZE = "prioritize"
25 enum class MessageState(val id: String) {
29 PRIORITIZED("prioritized"),
30 AGGREGATED("aggregated"),
31 COMPLETED("completed"),
35 open class PrioritizationConfiguration : Serializable {
36 lateinit var expiryConfiguration: ExpiryConfiguration
37 lateinit var shutDownConfiguration: ShutDownConfiguration
38 lateinit var cleanConfiguration: CleanConfiguration
39 var kafkaConfiguration: KafkaConfiguration? = null // Optional Kafka Consumer Configuration
42 open class KafkaConfiguration : Serializable {
43 lateinit var inputTopicSelector: String // Consumer Configuration Selector
44 lateinit var expiredTopic: String // Publish Configuration Selector
45 lateinit var outputTopic: String // Publish Configuration Selector
48 open class ExpiryConfiguration : Serializable {
49 var frequencyMilli: Long = 30000L
50 var maxPollRecord: Int = 1000
53 open class ShutDownConfiguration : Serializable {
54 var waitMill: Long = 30000L
57 open class CleanConfiguration : Serializable {
58 var frequencyMilli: Long = 30000L
59 var expiredRecordsHoldDays: Int = 5
62 open class UpdateStateRequest : Serializable {
63 lateinit var id: String
64 var group: String? = null
65 var state: String? = null
68 data class CorrelationCheckResponse(
69 var message: String? = null,
70 var correlated: Boolean = false
73 data class TypeCorrelationKey(val type: String, val correlationId: String)