Package org.opencms.db.storage.s3
Class CmsS3ClientConfiguration
java.lang.Object
org.opencms.db.storage.s3.CmsS3ClientConfiguration
Configuration for the S3 client used by the storage backend.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault single API call attempt timeout in milliseconds.static final intDefault complete API call timeout in milliseconds.static final intDefault timeout for acquiring a pooled connection in milliseconds.static final intDefault connection timeout in milliseconds.static final intDefault maximum number of pooled connections.static final intDefault maximum number of retries.static final StringDefault AWS region.static final intDefault socket timeout in milliseconds. -
Constructor Summary
ConstructorsConstructorDescriptionCmsS3ClientConfiguration(String endpoint, String bucketName, String accessKey, String secretKey, boolean pathStyle, String region, int connectionTimeout, int socketTimeout, int apiCallAttemptTimeout, int apiCallTimeout, int maxRetries) Creates a new S3 client configuration.CmsS3ClientConfiguration(String endpoint, String bucketName, String accessKey, String secretKey, boolean pathStyle, String region, int connectionTimeout, int socketTimeout, int apiCallAttemptTimeout, int apiCallTimeout, int maxRetries, int maxConnections, int connectionAcquisitionTimeout) Creates a new S3 client configuration including connection pool settings. -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsS3ClientConfigurationcreateDefault(String endpoint, String bucketName, String accessKey, String secretKey, boolean pathStyle) Creates a new S3 client configuration using default client settings.Returns the access key.intReturns the single API call attempt timeout.intReturns the complete API call timeout.Returns the bucket name.intReturns the timeout for acquiring a pooled connection.intReturns the connection timeout.Returns the endpoint.intReturns the maximum number of pooled connections.intReturns the maximum number of retries.Returns the configured AWS region.Returns the secret key.intReturns the socket timeout.booleanReturns whether path-style access is configured.
-
Field Details
-
DEFAULT_API_CALL_TIMEOUT
Default complete API call timeout in milliseconds.- See Also:
-
DEFAULT_API_CALL_ATTEMPT_TIMEOUT
Default single API call attempt timeout in milliseconds.- See Also:
-
DEFAULT_CONNECTION_TIMEOUT
Default connection timeout in milliseconds.- See Also:
-
DEFAULT_CONNECTION_ACQUISITION_TIMEOUT
Default timeout for acquiring a pooled connection in milliseconds.- See Also:
-
DEFAULT_MAX_CONNECTIONS
Default maximum number of pooled connections.- See Also:
-
DEFAULT_MAX_RETRIES
Default maximum number of retries.- See Also:
-
DEFAULT_REGION
Default AWS region. -
DEFAULT_SOCKET_TIMEOUT
Default socket timeout in milliseconds.- See Also:
-
-
Constructor Details
-
CmsS3ClientConfiguration
public CmsS3ClientConfiguration(String endpoint, String bucketName, String accessKey, String secretKey, boolean pathStyle, String region, int connectionTimeout, int socketTimeout, int apiCallAttemptTimeout, int apiCallTimeout, int maxRetries) Creates a new S3 client configuration.- Parameters:
endpoint- the S3 endpointbucketName- the bucket nameaccessKey- the access keysecretKey- the secret keypathStyle- whether path-style access should be usedregion- the AWS regionconnectionTimeout- the connection timeout in millisecondssocketTimeout- the socket timeout in millisecondsapiCallAttemptTimeout- the timeout for a single API call attempt in millisecondsapiCallTimeout- the timeout for the complete API call in millisecondsmaxRetries- the maximum number of retries
-
CmsS3ClientConfiguration
public CmsS3ClientConfiguration(String endpoint, String bucketName, String accessKey, String secretKey, boolean pathStyle, String region, int connectionTimeout, int socketTimeout, int apiCallAttemptTimeout, int apiCallTimeout, int maxRetries, int maxConnections, int connectionAcquisitionTimeout) Creates a new S3 client configuration including connection pool settings.- Parameters:
endpoint- the S3 endpointbucketName- the bucket nameaccessKey- the S3 access keysecretKey- the S3 secret keypathStyle- whether path-style access should be usedregion- the AWS regionconnectionTimeout- the connection timeout in millisecondssocketTimeout- the socket timeout in millisecondsapiCallAttemptTimeout- the timeout for a single API call attempt in millisecondsapiCallTimeout- the timeout for the complete API call in millisecondsmaxRetries- the maximum number of retriesmaxConnections- the maximum number of pooled connectionsconnectionAcquisitionTimeout- the timeout for acquiring a pooled connection in milliseconds
-
-
Method Details
-
createDefault
public static CmsS3ClientConfiguration createDefault(String endpoint, String bucketName, String accessKey, String secretKey, boolean pathStyle) Creates a new S3 client configuration using default client settings.- Parameters:
endpoint- the S3 endpointbucketName- the bucket nameaccessKey- the access keysecretKey- the secret keypathStyle- whether path-style access should be used- Returns:
- the configuration
-
getAccessKey
Returns the access key.- Returns:
- the access key
-
getApiCallAttemptTimeout
Returns the single API call attempt timeout.- Returns:
- the timeout in milliseconds
-
getApiCallTimeout
Returns the complete API call timeout.- Returns:
- the timeout in milliseconds
-
getBucketName
Returns the bucket name.- Returns:
- the bucket name
-
getConnectionAcquisitionTimeout
Returns the timeout for acquiring a pooled connection.- Returns:
- the timeout in milliseconds
-
getConnectionTimeout
Returns the connection timeout.- Returns:
- the timeout in milliseconds
-
getEndpoint
Returns the endpoint.- Returns:
- the endpoint
-
getMaxConnections
Returns the maximum number of pooled connections.- Returns:
- the maximum number of pooled connections
-
getMaxRetries
Returns the maximum number of retries.- Returns:
- the maximum number of retries
-
getRegion
Returns the configured AWS region.- Returns:
- the AWS region
-
getSecretKey
Returns the secret key.- Returns:
- the secret key
-
getSocketTimeout
Returns the socket timeout.- Returns:
- the timeout in milliseconds
-
isPathStyle
Returns whether path-style access is configured.- Returns:
- true if path-style access is configured
-