diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-02-18 16:47:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-02-18 16:47:19 +0000 |
commit | ec47175357058d256e625bf120d152dbd49b54be (patch) | |
tree | b1b91c8fcf26e7c84b17a2050b02f4ae0e20156d /ms/blueprintsprocessor/modules | |
parent | 6ed2cdca58d2d70ce07594bd9ee253f62d90af4c (diff) | |
parent | aa7eeb999f1fcb7edc190fbcefe9747fc6e63059 (diff) |
Merge "Removed manual shutdown hook for hazelcast"
Diffstat (limited to 'ms/blueprintsprocessor/modules')
-rw-r--r-- | ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazlecastClusterService.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazlecastClusterService.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazlecastClusterService.kt index 09641458c..6be3334bb 100644 --- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazlecastClusterService.kt +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazlecastClusterService.kt @@ -54,7 +54,7 @@ open class HazlecastClusterService : BluePrintClusterService { var joinedLite = false override suspend fun <T> startCluster(configuration: T) { - /** Get the Hazelcast Cliet or Server instance */ + /** Get the Hazelcast Client or Server instance */ hazelcast = when (configuration) { is Config -> { @@ -101,6 +101,8 @@ open class HazlecastClusterService : BluePrintClusterService { } else { /** Hazelcast Server from config file */ val hazelcastServerConfiguration = FileSystemYamlConfig(normalizedFile(configFile)) + hazelcastServerConfiguration.clusterName = configuration.id + hazelcastServerConfiguration.instanceName = configuration.nodeId hazelcastServerConfiguration.properties = configuration.properties hazelcastServerConfiguration.memberAttributeConfig = memberAttributeConfig joinedLite = hazelcastServerConfiguration.isLiteMember @@ -116,7 +118,7 @@ open class HazlecastClusterService : BluePrintClusterService { } /** Add the Membership Listeners */ - hazelcast.cluster.addMembershipListener(BlueprintsClusterMembershipListener(this)) + hazelcast.cluster.addMembershipListener(BlueprintsClusterMembershipListener()) log.info( "Cluster(${hazelcast.config.clusterName}) node(${hazelcast.name}) created successfully...." ) @@ -207,7 +209,7 @@ open class HazlecastClusterService : BluePrintClusterService { } } -open class BlueprintsClusterMembershipListener(val hazlecastClusterService: HazlecastClusterService) : +open class BlueprintsClusterMembershipListener() : MembershipListener { private val log = logger(BlueprintsClusterMembershipListener::class) |