You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2015/07/17 10:08:05 UTC

[1/3] git commit: updated refs/heads/master to 8d96aab

Repository: cloudstack
Updated Branches:
  refs/heads/master b1e590692 -> 8d96aab9b


CLOUDSTACK-8581: Do not make attributes final and don't set them to null

Signed-off-by: Wido den Hollander <wi...@widodh.nl>

This closes #582


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8d96aab9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8d96aab9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8d96aab9

Branch: refs/heads/master
Commit: 8d96aab9b2ee32038d43d13b3d85c6a0c7729ee6
Parents: 4b61f5a
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Thu Jul 16 18:13:46 2015 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Fri Jul 17 10:07:04 2015 +0200

----------------------------------------------------------------------
 .../api/command/admin/storage/AddS3Cmd.java           | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d96aab9/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
index 09272a5..d54cb75 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
@@ -68,28 +68,28 @@ public final class AddS3Cmd extends BaseCmd {
     private String secretKey;
 
     @Parameter(name = S3_END_POINT, type = STRING, required = false, description = "S3 host name")
-    private final String endPoint = null;
+    private String endPoint;
 
     @Parameter(name = S3_BUCKET_NAME, type = STRING, required = true, description = "name of the template storage bucket")
     private String bucketName;
 
     @Parameter(name = S3_HTTPS_FLAG, type = BOOLEAN, required = false, description = "connect to the S3 endpoint via HTTPS?")
-    private final Boolean httpsFlag = null;
+    private Boolean httpsFlag;
 
     @Parameter(name = S3_CONNECTION_TIMEOUT, type = INTEGER, required = false, description = "connection timeout (milliseconds)")
-    private final Integer connectionTimeout = null;
+    private Integer connectionTimeout;
 
     @Parameter(name = S3_MAX_ERROR_RETRY, type = INTEGER, required = false, description = "maximum number of times to retry on error")
-    private final Integer maxErrorRetry = null;
+    private Integer maxErrorRetry;
 
     @Parameter(name = S3_SOCKET_TIMEOUT, type = INTEGER, required = false, description = "socket timeout (milliseconds)")
-    private final Integer socketTimeout = null;
+    private Integer socketTimeout;
 
     @Parameter(name = S3_CONNECTION_TTL, type = INTEGER, required = false, description = "connection ttl (milliseconds)")
-    private final Integer connectionTtl = null;
+    private Integer connectionTtl;
 
     @Parameter(name = S3_USE_TCP_KEEPALIVE, type = BOOLEAN, required = false, description = "whether tcp keepalive is used")
-    private final Boolean useTCPKeepAlive = null;
+    private Boolean useTCPKeepAlive;
 
     @Override
     public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,


[3/3] git commit: updated refs/heads/master to 8d96aab

Posted by wi...@apache.org.
CLOUDSTACK-8581: S3, make connection TTL and TCP KeepAlive configureable

Signed-off-by: Wido den Hollander <wi...@widodh.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/178a9f55
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/178a9f55
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/178a9f55

Branch: refs/heads/master
Commit: 178a9f555d9ba44ecee68cbcdfd89cd10a08f43f
Parents: b1e5906
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Tue Jul 14 08:17:49 2015 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Fri Jul 17 10:07:04 2015 +0200

----------------------------------------------------------------------
 api/src/com/cloud/agent/api/to/S3TO.java        | 34 +++++++++++++++++++-
 .../org/apache/cloudstack/api/ApiConstants.java |  2 ++
 .../api/command/admin/storage/AddS3Cmd.java     | 31 ++++++++++++++++++
 .../driver/S3ImageStoreDriverImpl.java          |  4 ++-
 utils/src/com/cloud/utils/S3Utils.java          | 17 ++++++++--
 5 files changed, 84 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/178a9f55/api/src/com/cloud/agent/api/to/S3TO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/S3TO.java b/api/src/com/cloud/agent/api/to/S3TO.java
index 346dd62..a46d609 100644
--- a/api/src/com/cloud/agent/api/to/S3TO.java
+++ b/api/src/com/cloud/agent/api/to/S3TO.java
@@ -34,9 +34,11 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
     private String endPoint;
     private String bucketName;
     private Boolean httpsFlag;
+    private Boolean useTCPKeepAlive;
     private Integer connectionTimeout;
     private Integer maxErrorRetry;
     private Integer socketTimeout;
+    private Integer connectionTtl;
     private Date created;
     private boolean enableRRS;
     private long maxSingleUploadSizeInBytes;
@@ -50,7 +52,7 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
 
     public S3TO(final Long id, final String uuid, final String accessKey, final String secretKey, final String endPoint, final String bucketName,
             final Boolean httpsFlag, final Integer connectionTimeout, final Integer maxErrorRetry, final Integer socketTimeout, final Date created,
-            final boolean enableRRS, final long maxUploadSize) {
+            final boolean enableRRS, final long maxUploadSize, final Integer connectionTtl, final Boolean useTCPKeepAlive) {
 
         super();
 
@@ -67,6 +69,8 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
         this.created = created;
         this.enableRRS = enableRRS;
         this.maxSingleUploadSizeInBytes = maxUploadSize;
+        this.connectionTtl = connectionTtl;
+        this.useTCPKeepAlive = useTCPKeepAlive;
 
     }
 
@@ -118,6 +122,14 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
             return false;
         }
 
+        if (connectionTtl != null ? !connectionTtl.equals(thatS3TO.connectionTtl) : thatS3TO.connectionTtl != null) {
+            return false;
+        }
+
+        if (useTCPKeepAlive != null ? !useTCPKeepAlive.equals(thatS3TO.useTCPKeepAlive) : thatS3TO.useTCPKeepAlive != null) {
+            return false;
+        }
+
         if (bucketName != null ? !bucketName.equals(thatS3TO.bucketName) : thatS3TO.bucketName != null) {
             return false;
         }
@@ -147,6 +159,8 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
         result = 31 * result + (connectionTimeout != null ? connectionTimeout.hashCode() : 0);
         result = 31 * result + (maxErrorRetry != null ? maxErrorRetry.hashCode() : 0);
         result = 31 * result + (socketTimeout != null ? socketTimeout.hashCode() : 0);
+        result = 31 * result + (connectionTtl != null ? connectionTtl.hashCode() : 0);
+        result = 31 * result + (useTCPKeepAlive ? 1 : 0);
 
         return result;
 
@@ -245,6 +259,24 @@ public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
         this.socketTimeout = socketTimeout;
     }
 
+    @Override
+    public Integer getConnectionTtl() {
+        return this.connectionTtl;
+    }
+
+    public void setConnectionTtl(final Integer connectionTtl) {
+        this.connectionTtl = connectionTtl;
+    }
+
+    @Override
+    public Boolean getUseTCPKeepAlive() {
+        return this.useTCPKeepAlive;
+    }
+
+    public void setUseTCPKeepAlive(final Boolean useTCPKeepAlive) {
+        this.useTCPKeepAlive = useTCPKeepAlive;
+    }
+
     public Date getCreated() {
         return this.created;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/178a9f55/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 830583b..0e7ff88 100644
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -502,8 +502,10 @@ public class ApiConstants {
     public static final String S3_BUCKET_NAME = "bucket";
     public static final String S3_HTTPS_FLAG = "usehttps";
     public static final String S3_CONNECTION_TIMEOUT = "connectiontimeout";
+    public static final String S3_CONNECTION_TTL = "connectionttl";
     public static final String S3_MAX_ERROR_RETRY = "maxerrorretry";
     public static final String S3_SOCKET_TIMEOUT = "sockettimeout";
+    public static final String S3_USE_TCP_KEEPALIVE = "usetcpkeepalive";
     public static final String INCL_ZONES = "includezones";
     public static final String EXCL_ZONES = "excludezones";
     public static final String SOURCE = "source";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/178a9f55/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
index 4164394..09272a5 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
@@ -22,11 +22,13 @@ import static com.cloud.user.Account.ACCOUNT_ID_SYSTEM;
 import static org.apache.cloudstack.api.ApiConstants.S3_ACCESS_KEY;
 import static org.apache.cloudstack.api.ApiConstants.S3_BUCKET_NAME;
 import static org.apache.cloudstack.api.ApiConstants.S3_CONNECTION_TIMEOUT;
+import static org.apache.cloudstack.api.ApiConstants.S3_CONNECTION_TTL;
 import static org.apache.cloudstack.api.ApiConstants.S3_END_POINT;
 import static org.apache.cloudstack.api.ApiConstants.S3_HTTPS_FLAG;
 import static org.apache.cloudstack.api.ApiConstants.S3_MAX_ERROR_RETRY;
 import static org.apache.cloudstack.api.ApiConstants.S3_SECRET_KEY;
 import static org.apache.cloudstack.api.ApiConstants.S3_SOCKET_TIMEOUT;
+import static org.apache.cloudstack.api.ApiConstants.S3_USE_TCP_KEEPALIVE;
 import static org.apache.cloudstack.api.BaseCmd.CommandType.BOOLEAN;
 import static org.apache.cloudstack.api.BaseCmd.CommandType.INTEGER;
 import static org.apache.cloudstack.api.BaseCmd.CommandType.STRING;
@@ -83,6 +85,12 @@ public final class AddS3Cmd extends BaseCmd {
     @Parameter(name = S3_SOCKET_TIMEOUT, type = INTEGER, required = false, description = "socket timeout (milliseconds)")
     private final Integer socketTimeout = null;
 
+    @Parameter(name = S3_CONNECTION_TTL, type = INTEGER, required = false, description = "connection ttl (milliseconds)")
+    private final Integer connectionTtl = null;
+
+    @Parameter(name = S3_USE_TCP_KEEPALIVE, type = BOOLEAN, required = false, description = "whether tcp keepalive is used")
+    private final Boolean useTCPKeepAlive = null;
+
     @Override
     public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
         ResourceAllocationException, NetworkRuleConflictException {
@@ -104,6 +112,12 @@ public final class AddS3Cmd extends BaseCmd {
         if (getSocketTimeout() != null) {
             dm.put(ApiConstants.S3_SOCKET_TIMEOUT, getSocketTimeout().toString());
         }
+        if (getConnectionTtl() != null) {
+            dm.put(ApiConstants.S3_CONNECTION_TTL, getConnectionTtl().toString());
+        }
+        if (getUseTCPKeepAlive() != null) {
+            dm.put(ApiConstants.S3_USE_TCP_KEEPALIVE, getUseTCPKeepAlive().toString());
+        }
 
 
         try{
@@ -168,6 +182,14 @@ public final class AddS3Cmd extends BaseCmd {
             return false;
         }
 
+        if (connectionTtl != null ? !connectionTtl.equals(thatAddS3Cmd.connectionTtl) : thatAddS3Cmd.connectionTtl != null) {
+            return false;
+        }
+
+        if (useTCPKeepAlive != null ? !useTCPKeepAlive.equals(thatAddS3Cmd.useTCPKeepAlive) : thatAddS3Cmd.useTCPKeepAlive != null) {
+            return false;
+        }
+
         return true;
 
     }
@@ -183,6 +205,8 @@ public final class AddS3Cmd extends BaseCmd {
         result = 31 * result + (connectionTimeout != null ? connectionTimeout.hashCode() : 0);
         result = 31 * result + (maxErrorRetry != null ? maxErrorRetry.hashCode() : 0);
         result = 31 * result + (socketTimeout != null ? socketTimeout.hashCode() : 0);
+        result = 31 * result + (connectionTtl != null ? connectionTtl.hashCode() : 0);
+        result = 31 * result + (useTCPKeepAlive != null && useTCPKeepAlive == true ? 1 : 0);
 
         return result;
 
@@ -230,4 +254,11 @@ public final class AddS3Cmd extends BaseCmd {
         return socketTimeout;
     }
 
+    public Integer getConnectionTtl() {
+        return connectionTtl;
+    }
+
+    public Boolean getUseTCPKeepAlive() {
+        return useTCPKeepAlive;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/178a9f55/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
index b6743aa..8705892 100644
--- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
+++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
@@ -60,7 +60,9 @@ public class S3ImageStoreDriverImpl extends BaseImageStoreDriverImpl {
                 : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TIMEOUT)), details.get(ApiConstants.S3_MAX_ERROR_RETRY) == null ? null
                 : Integer.valueOf(details.get(ApiConstants.S3_MAX_ERROR_RETRY)), details.get(ApiConstants.S3_SOCKET_TIMEOUT) == null ? null
                 : Integer.valueOf(details.get(ApiConstants.S3_SOCKET_TIMEOUT)), imgStore.getCreated(), _configDao.getValue(Config.S3EnableRRS.toString()) == null ? false
-                : Boolean.parseBoolean(_configDao.getValue(Config.S3EnableRRS.toString())), getMaxSingleUploadSizeInBytes());
+                : Boolean.parseBoolean(_configDao.getValue(Config.S3EnableRRS.toString())), getMaxSingleUploadSizeInBytes(),
+                details.get(ApiConstants.S3_CONNECTION_TTL) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TTL)),
+                details.get(ApiConstants.S3_USE_TCP_KEEPALIVE) == null ? null : Boolean.parseBoolean(details.get(ApiConstants.S3_USE_TCP_KEEPALIVE)));
 
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/178a9f55/utils/src/com/cloud/utils/S3Utils.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/S3Utils.java b/utils/src/com/cloud/utils/S3Utils.java
index ae7a453..fc8a3cc 100644
--- a/utils/src/com/cloud/utils/S3Utils.java
+++ b/utils/src/com/cloud/utils/S3Utils.java
@@ -102,9 +102,18 @@ public final class S3Utils {
             configuration.setSocketTimeout(clientOptions.getSocketTimeout());
         }
 
+        if (clientOptions.getUseTCPKeepAlive() != null) {
+            configuration.setUseTcpKeepAlive(clientOptions.getUseTCPKeepAlive());
+        }
+
+        if (clientOptions.getConnectionTtl() != null) {
+            configuration.setConnectionTTL(clientOptions.getConnectionTtl());
+        }
+
         if (LOGGER.isDebugEnabled()) {
-            LOGGER.debug(format("Creating S3 client with configuration: [protocol: %1$s, connectionTimeOut: " + "%2$s, maxErrorRetry: %3$s, socketTimeout: %4$s]",
-                configuration.getProtocol(), configuration.getConnectionTimeout(), configuration.getMaxErrorRetry(), configuration.getSocketTimeout()));
+            LOGGER.debug(format("Creating S3 client with configuration: [protocol: %1$s, connectionTimeOut: " + "%2$s, maxErrorRetry: %3$s, socketTimeout: %4$s, useTCPKeepAlive: %5$s, connectionTtl: %6$s]",
+                configuration.getProtocol(), configuration.getConnectionTimeout(), configuration.getMaxErrorRetry(), configuration.getSocketTimeout(),
+                configuration.useTcpKeepAlive(), configuration.getConnectionTTL()));
         }
 
         final AmazonS3Client client = new AmazonS3Client(credentials, configuration);
@@ -510,6 +519,7 @@ public final class S3Utils {
         errorMessages.addAll(checkOptionalField("connection timeout", clientOptions.getConnectionTimeout()));
         errorMessages.addAll(checkOptionalField("socket timeout", clientOptions.getSocketTimeout()));
         errorMessages.addAll(checkOptionalField("max error retries", clientOptions.getMaxErrorRetry()));
+        errorMessages.addAll(checkOptionalField("connection ttl", clientOptions.getConnectionTtl()));
 
         return unmodifiableList(errorMessages);
 
@@ -566,6 +576,9 @@ public final class S3Utils {
 
         Integer getSocketTimeout();
 
+        Boolean getUseTCPKeepAlive();
+
+        Integer getConnectionTtl();
     }
 
     public interface ObjectNamingStrategy {


[2/3] git commit: updated refs/heads/master to 8d96aab

Posted by wi...@apache.org.
CLOUDSTACK-8581: Make the code which initiates the S3TO object more readable

All arguments are now on a own line which makes the code easier to read

Signed-off-by: Wido den Hollander <wi...@widodh.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4b61f5a1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4b61f5a1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4b61f5a1

Branch: refs/heads/master
Commit: 4b61f5a17abbaed8bb412a1c5190147fdd60526c
Parents: 178a9f5
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Tue Jul 14 13:58:34 2015 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Fri Jul 17 10:07:04 2015 +0200

----------------------------------------------------------------------
 .../driver/S3ImageStoreDriverImpl.java          | 24 ++++++++++++--------
 1 file changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b61f5a1/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
index 8705892..2d723f4 100644
--- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
+++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
@@ -54,16 +54,20 @@ public class S3ImageStoreDriverImpl extends BaseImageStoreDriverImpl {
     public DataStoreTO getStoreTO(DataStore store) {
         ImageStoreImpl imgStore = (ImageStoreImpl)store;
         Map<String, String> details = _imageStoreDetailsDao.getDetails(imgStore.getId());
-        return new S3TO(imgStore.getId(), imgStore.getUuid(), details.get(ApiConstants.S3_ACCESS_KEY), details.get(ApiConstants.S3_SECRET_KEY),
-            details.get(ApiConstants.S3_END_POINT), details.get(ApiConstants.S3_BUCKET_NAME), details.get(ApiConstants.S3_HTTPS_FLAG) == null ? false
-                : Boolean.parseBoolean(details.get(ApiConstants.S3_HTTPS_FLAG)), details.get(ApiConstants.S3_CONNECTION_TIMEOUT) == null ? null
-                : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TIMEOUT)), details.get(ApiConstants.S3_MAX_ERROR_RETRY) == null ? null
-                : Integer.valueOf(details.get(ApiConstants.S3_MAX_ERROR_RETRY)), details.get(ApiConstants.S3_SOCKET_TIMEOUT) == null ? null
-                : Integer.valueOf(details.get(ApiConstants.S3_SOCKET_TIMEOUT)), imgStore.getCreated(), _configDao.getValue(Config.S3EnableRRS.toString()) == null ? false
-                : Boolean.parseBoolean(_configDao.getValue(Config.S3EnableRRS.toString())), getMaxSingleUploadSizeInBytes(),
-                details.get(ApiConstants.S3_CONNECTION_TTL) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TTL)),
-                details.get(ApiConstants.S3_USE_TCP_KEEPALIVE) == null ? null : Boolean.parseBoolean(details.get(ApiConstants.S3_USE_TCP_KEEPALIVE)));
-
+        return new S3TO(imgStore.getId(),
+                        imgStore.getUuid(),
+                        details.get(ApiConstants.S3_ACCESS_KEY),
+                        details.get(ApiConstants.S3_SECRET_KEY),
+                        details.get(ApiConstants.S3_END_POINT), details.get(ApiConstants.S3_BUCKET_NAME),
+                        details.get(ApiConstants.S3_HTTPS_FLAG) == null ? false : Boolean.parseBoolean(details.get(ApiConstants.S3_HTTPS_FLAG)),
+                        details.get(ApiConstants.S3_CONNECTION_TIMEOUT) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TIMEOUT)),
+                        details.get(ApiConstants.S3_MAX_ERROR_RETRY) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_MAX_ERROR_RETRY)),
+                        details.get(ApiConstants.S3_SOCKET_TIMEOUT) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_SOCKET_TIMEOUT)),
+                        imgStore.getCreated(),
+                        _configDao.getValue(Config.S3EnableRRS.toString()) == null ? false : Boolean.parseBoolean(_configDao.getValue(Config.S3EnableRRS.toString())),
+                        getMaxSingleUploadSizeInBytes(),
+                        details.get(ApiConstants.S3_CONNECTION_TTL) == null ? null : Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TTL)),
+                        details.get(ApiConstants.S3_USE_TCP_KEEPALIVE) == null ? null : Boolean.parseBoolean(details.get(ApiConstants.S3_USE_TCP_KEEPALIVE)));
     }
 
     private long getMaxSingleUploadSizeInBytes() {