Merge "Add period after inheritDoc for Sonar"
[policy/apex-pdp.git] / plugins / plugins-context / plugins-context-distribution / plugins-context-distribution-infinispan / src / main / java / org / onap / policy / apex / plugins / context / distribution / infinispan / InfinispanDistributorParameters.java
1 /*-
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
8  * 
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  * 
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.
16  * 
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.apex.plugins.context.distribution.infinispan;
22
23 import org.onap.policy.apex.context.parameters.DistributorParameters;
24
25 /**
26  * Distributor parameters for the Infinspan Distributor.
27  *
28  * @author Liam Fallon (liam.fallon@ericsson.com)
29  */
30 public class InfinispanDistributorParameters extends DistributorParameters {
31     // @formatter:off
32     
33     /** The default Infinispan configuration file location. */
34     public static final String  DEFAULT_INFINISPAN_DISTRIBUTION_CONFIG_FILE = "infinispan/infinispan.xml";
35
36     /** The default Infinispan jgroups configuration file location. */
37     public static final String  DEFAULT_INFINISPAN_DISTRIBUTION_JGROUPS_FILE = null;
38
39     /** The default Infinispan IP stack is IPV4. */
40     public static final boolean DEFAULT_INFINISPAN_JAVA_NET_PREFER_IPV4_STACK = true;
41
42     /** The default Infinispan bind address is localhost. */
43     public static final String  DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS = "localhost";
44
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;
50     // @formatter:on
51
52     /**
53      * The Constructor.
54      */
55     public InfinispanDistributorParameters() {
56         super();
57     }
58
59     /**
60      * Gets the config file.
61      *
62      * @return the config file
63      */
64     public String getConfigFile() {
65         return configFile;
66     }
67
68     /**
69      * Sets the config file.
70      *
71      * @param configFile the config file
72      */
73     public void setConfigFile(final String configFile) {
74         this.configFile = configFile;
75     }
76
77     /**
78      * Gets the jgroups file.
79      *
80      * @return the jgroups file
81      */
82     public String getJgroupsFile() {
83         return jgroupsFile;
84     }
85
86     /**
87      * Sets the jgroups file.
88      *
89      * @param jgroupsFile the jgroups file
90      */
91     public void setJgroupsFile(final String jgroupsFile) {
92         this.jgroupsFile = jgroupsFile;
93     }
94
95     /**
96      * Prefer I pv 4 stack.
97      *
98      * @return true, if prefer I pv 4 stack
99      */
100     public boolean preferIPv4Stack() {
101         return preferIPv4Stack;
102     }
103
104     /**
105      * Sets the prefer I pv 4 stack.
106      *
107      * @param preferIPv4Stack the prefer I pv 4 stack
108      */
109     public void setPreferIPv4Stack(final boolean preferIPv4Stack) {
110         this.preferIPv4Stack = preferIPv4Stack;
111     }
112
113     /**
114      * Getj groups bind address.
115      *
116      * @return the j groups bind address
117      */
118     public String getjGroupsBindAddress() {
119         return jgroupsBindAddress;
120     }
121
122     /**
123      * Setj groups bind address.
124      *
125      * @param jgroupsBindAddress the j groups bind address
126      */
127     public void setjGroupsBindAddress(final String jgroupsBindAddress) {
128         this.jgroupsBindAddress = jgroupsBindAddress;
129     }
130
131     /*
132      * (non-Javadoc)
133      * 
134      * @see org.onap.policy.apex.context.parameters.DistributorParameters#toString()
135      */
136     @Override
137     public String toString() {
138         return "InfinispanDistributorParameters [configFile=" + configFile + ", jgroupsFile=" + jgroupsFile
139                 + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jgroupsBindAddress + "]";
140     }
141 }