From 338cc2611738783285f9edebd259f7e6bff3973d Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 2 Aug 2021 15:28:00 -0400 Subject: Use lombok in apex-pdp #3 Updated plugins thru plugins-persistence-jpa-eclipselink. Issue-ID: POLICY-3391 Change-Id: Id7a5aeca8bb45c7a089f0b9d49c9ecd4bc8a7178 Signed-off-by: Jim Hahn --- .../hazelcast/HazelcastContextDistributor.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src') diff --git a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java index 3d6bd55c0..c1956330a 100644 --- a/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java +++ b/plugins/plugins-context/plugins-context-distribution/plugins-context-distribution-hazelcast/src/main/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributor.java @@ -1,19 +1,20 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * 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========================================================= */ @@ -23,6 +24,8 @@ package org.onap.policy.apex.plugins.context.distribution.hazelcast; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import java.util.Map; +import lombok.AccessLevel; +import lombok.Setter; import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.context.impl.distribution.AbstractDistributor; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; @@ -40,6 +43,7 @@ public class HazelcastContextDistributor extends AbstractDistributor { private static final XLogger LOGGER = XLoggerFactory.getXLogger(HazelcastContextDistributor.class); // The hazelcast instance for distributing context for this JVM + @Setter(AccessLevel.PRIVATE) private static HazelcastInstance hazelcastInstance = null; /** @@ -71,14 +75,6 @@ public class HazelcastContextDistributor extends AbstractDistributor { LOGGER.exit("init(" + key + ")"); } - /** - * Set the hazelcast instance statically. - * @param newHazelcastInstance the hazelcast instance - */ - private static void setHazelcastInstance(HazelcastInstance newHazelcastInstance) { - hazelcastInstance = newHazelcastInstance; - } - /** * {@inheritDoc}. */ -- cgit 1.2.3-korg