2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.apex.context.parameters;
24 import org.onap.policy.apex.context.impl.locking.jvmlocal.JvmLocalLockManager;
25 import org.onap.policy.common.parameters.ParameterGroupImpl;
26 import org.onap.policy.common.parameters.annotations.ClassName;
27 import org.onap.policy.common.parameters.annotations.NotNull;
30 * An empty lock manager parameter class that may be specialized by context lock manager plugins
31 * that require plugin specific parameters. The class defines the default lock manager plugin as the
32 * JVM local lock manager.
34 * @author Liam Fallon (liam.fallon@ericsson.com)
37 public class LockManagerParameters extends ParameterGroupImpl {
39 * The default lock manager can lock context album instance across all threads in a single JVM.
41 public static final String DEFAULT_LOCK_MANAGER_PLUGIN_CLASS = JvmLocalLockManager.class.getName();
43 private @ClassName String pluginClass = DEFAULT_LOCK_MANAGER_PLUGIN_CLASS;
46 * Constructor to create a lock manager parameters instance and register the instance with the
49 public LockManagerParameters() {
50 super(ContextParameterConstants.LOCKING_GROUP_NAME);
54 * Gets the plugin class.
56 * @return the plugin class
58 public String getPluginClass() {
63 * Sets the plugin class.
65 * @param pluginClass the plugin class
67 public void setPluginClass(final String pluginClass) {
68 this.pluginClass = pluginClass;
72 public String toString() {
73 return "LockManagerParameters [name=" + getName() + ", pluginClass=" + pluginClass + "]";