aboutsummaryrefslogtreecommitdiffstats
path: root/common-app-api/src
diff options
context:
space:
mode:
authorTal Gitelman <tal.gitelman@att.com>2019-03-28 11:00:54 +0200
committerTal Gitelman <tal.gitelman@att.com>2019-04-04 16:33:03 +0300
commitc4d387d216e72911f80c1ebee91b73aba191b91b (patch)
treec12066b7a213d34ca7c84375fb4bb2d6f0b23138 /common-app-api/src
parentac3aca69dbeae29c9aeca2053adc7aedbb75e149 (diff)
Make Cassandra port configurable.
SDC-BE & Onboarding - BE. Reviewer: Evgenia A & Areli F. Change-Id: Iaf86d647b0560764ef65d9148c85bffaf934992d Issue-ID: SDC-2077 Signed-off-by: Tal Gitelman <tal.gitelman@att.com>
Diffstat (limited to 'common-app-api/src')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
index f7f9834259..6325f00f3e 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
@@ -653,8 +653,10 @@ public class Configuration extends BasicConfiguration {
}
public static class CassandrConfig {
+ private static final Integer CASSANDRA_DEFAULT_PORT = 9042;
List<String> cassandraHosts;
+ Integer cassandraPort;
String localDataCenter;
Long reconnectTimeout;
Integer socketReadTimeout;
@@ -667,6 +669,10 @@ public class Configuration extends BasicConfiguration {
String truststorePath;
String truststorePassword;
+ public Integer getCassandraPort() { return cassandraPort != null ? cassandraPort : Configuration.CassandrConfig.CASSANDRA_DEFAULT_PORT; }
+
+ public void setCassandraPort(Integer cassandraPort) { this.cassandraPort = cassandraPort; }
+
public String getLocalDataCenter() {
return localDataCenter;
}