aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaUtils.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaUtils.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaUtils.java
index 76532f6ed8..862e2adcc0 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaUtils.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/schema/SdcSchemaUtils.java
@@ -148,15 +148,22 @@ public class SdcSchemaUtils {
}
return true;
}
-
-
+
private void setSocketOptions(Cluster.Builder clusterBuilder, Configuration.CassandrConfig config) {
- SocketOptions socketOptions =new SocketOptions();
+ SocketOptions socketOptions = new SocketOptions();
Integer socketConnectTimeout = config.getSocketConnectTimeout();
- if( socketConnectTimeout!=null ){
- log.info("SocketConnectTimeout was provided, setting Cassandra client to use SocketConnectTimeout: {} .",socketConnectTimeout);
+ if (socketConnectTimeout != null) {
+ log.info("SocketConnectTimeout was provided, setting Cassandra client to use SocketConnectTimeout: {} .",
+ socketConnectTimeout);
socketOptions.setConnectTimeoutMillis(socketConnectTimeout);
}
+
+ Integer socketReadTimeout = config.getSocketReadTimeout();
+ if (socketReadTimeout != null) {
+ log.info("SocketReadTimeout was provided, setting Cassandra client to use SocketReadTimeout: {} .",
+ socketReadTimeout);
+ socketOptions.setReadTimeoutMillis(socketReadTimeout);
+ }
clusterBuilder.withSocketOptions(socketOptions);
}