MAX_BYTES_PER_SECOND = 1024 * jets3tProperties.getLongProperty("httpclient.read-throttle", 0);
MAX_BYTES_PER_SECOND = 1024 * jets3tProperties.getLongProperty("httpclient.read-throttle", 0);
fileMaxSizeMB = uploaderProperties.getLongProperty("file.maxSizeMB", 200); fileMinSizeMB = uploaderProperties.getLongProperty("file.minSizeMB", 0);
fileMaxSizeMB = uploaderProperties.getLongProperty("file.maxSizeMB", 200); fileMinSizeMB = uploaderProperties.getLongProperty("file.minSizeMB", 0);
long maxUploadPartSize = properties.getLongProperty( "upload.max-part-size", MultipartUtils.MAX_OBJECT_SIZE); multipartUtils = new MultipartUtils(maxUploadPartSize);
long maxUploadPartSize = properties.getLongProperty( "upload.max-part-size", MultipartUtils.MAX_OBJECT_SIZE); multipartUtils = new MultipartUtils(maxUploadPartSize);
@Override protected AbstractConnPool createConnectionPool(final HttpParams params) { // Set the maximum connections per host for the HTTP connection manager, // *and* also set the maximum number of total connections (new in 0.7.1). // The max connections per host setting is made the same value as the max // global connections if there is no per-host property. Jets3tProperties props = (Jets3tProperties) params.getParameter( Jets3tProperties.JETS3T_PROPERTIES_ID); int maxConn = 20; int maxConnectionsPerHost = 0; if (props != null) { maxConn = props.getIntProperty("httpclient.max-connections", 20); maxConnectionsPerHost = props.getIntProperty( "httpclient.max-connections-per-host", 0); } if (maxConnectionsPerHost == 0) { maxConnectionsPerHost = maxConn; } connPerRoute.setDefaultMaxPerRoute(maxConnectionsPerHost); return new ConnPoolByRoute(connOperator, connPerRoute, maxConn,props.getLongProperty("httpclient.connection.ttl", -1L), TimeUnit.MILLISECONDS); } } //ThreadSafeConnManager
@Override protected AbstractConnPool createConnectionPool(final HttpParams params) { // Set the maximum connections per host for the HTTP connection manager, // *and* also set the maximum number of total connections (new in 0.7.1). // The max connections per host setting is made the same value as the max // global connections if there is no per-host property. Jets3tProperties props = (Jets3tProperties) params.getParameter( Jets3tProperties.JETS3T_PROPERTIES_ID); int maxConn = 20; int maxConnectionsPerHost = 0; if (props != null) { maxConn = props.getIntProperty("httpclient.max-connections", 20); maxConnectionsPerHost = props.getIntProperty( "httpclient.max-connections-per-host", 0); } if (maxConnectionsPerHost == 0) { maxConnectionsPerHost = maxConn; } connPerRoute.setDefaultMaxPerRoute(maxConnectionsPerHost); return new ConnPoolByRoute(connOperator, connPerRoute, maxConn,props.getLongProperty("httpclient.connection.ttl", -1L), TimeUnit.MILLISECONDS); } } //ThreadSafeConnManager
= jets3tProperties.getLongProperty("httpclient.connection-manager-timeout", 0); ConnManagerParams.setTimeout(params, connectionManagerTimeout);
= jets3tProperties.getLongProperty("httpclient.connection-manager-timeout", 0); ConnManagerParams.setTimeout(params, connectionManagerTimeout);