2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.apex.plugins.context.distribution.infinispan;
23 import org.onap.policy.apex.context.parameters.DistributorParameters;
26 * Distributor parameters for the Infinspan Distributor.
28 * @author Liam Fallon (liam.fallon@ericsson.com)
30 public class InfinispanDistributorParameters extends DistributorParameters {
33 /** The default Infinispan configuration file location. */
34 public static final String DEFAULT_INFINISPAN_DISTRIBUTION_CONFIG_FILE = "infinispan/infinispan.xml";
36 /** The default Infinispan jgroups configuration file location. */
37 public static final String DEFAULT_INFINISPAN_DISTRIBUTION_JGROUPS_FILE = null;
39 /** The default Infinispan IP stack is IPV4. */
40 public static final boolean DEFAULT_INFINISPAN_JAVA_NET_PREFER_IPV4_STACK = true;
42 /** The default Infinispan bind address is localhost. */
43 public static final String DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS = "localhost";
45 // Infinspan configuration file names
46 private String configFile = DEFAULT_INFINISPAN_DISTRIBUTION_CONFIG_FILE;
47 private String jgroupsFile = DEFAULT_INFINISPAN_DISTRIBUTION_JGROUPS_FILE;
48 private boolean preferIPv4Stack = DEFAULT_INFINISPAN_JAVA_NET_PREFER_IPV4_STACK;
49 private String jgroupsBindAddress = DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS;
55 public InfinispanDistributorParameters() {
60 * Gets the config file.
62 * @return the config file
64 public String getConfigFile() {
69 * Sets the config file.
71 * @param configFile the config file
73 public void setConfigFile(final String configFile) {
74 this.configFile = configFile;
78 * Gets the jgroups file.
80 * @return the jgroups file
82 public String getJgroupsFile() {
87 * Sets the jgroups file.
89 * @param jgroupsFile the jgroups file
91 public void setJgroupsFile(final String jgroupsFile) {
92 this.jgroupsFile = jgroupsFile;
96 * Prefer I pv 4 stack.
98 * @return true, if prefer I pv 4 stack
100 public boolean preferIPv4Stack() {
101 return preferIPv4Stack;
105 * Sets the prefer I pv 4 stack.
107 * @param preferIPv4Stack the prefer I pv 4 stack
109 public void setPreferIPv4Stack(final boolean preferIPv4Stack) {
110 this.preferIPv4Stack = preferIPv4Stack;
114 * Getj groups bind address.
116 * @return the j groups bind address
118 public String getjGroupsBindAddress() {
119 return jgroupsBindAddress;
123 * Setj groups bind address.
125 * @param jgroupsBindAddress the j groups bind address
127 public void setjGroupsBindAddress(final String jgroupsBindAddress) {
128 this.jgroupsBindAddress = jgroupsBindAddress;
134 * @see org.onap.policy.apex.context.parameters.DistributorParameters#toString()
137 public String toString() {
138 return "InfinispanDistributorParameters [configFile=" + configFile + ", jgroupsFile=" + jgroupsFile
139 + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jgroupsBindAddress + "]";