Class CmsS3ClientConfiguration

java.lang.Object
org.opencms.db.storage.s3.CmsS3ClientConfiguration

public class CmsS3ClientConfiguration extends Object
Configuration for the S3 client used by the storage backend.

  • Field Details

  • 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 endpoint
      bucketName - the bucket name
      accessKey - the access key
      secretKey - the secret key
      pathStyle - whether path-style access should be used
      region - the AWS region
      connectionTimeout - the connection timeout in milliseconds
      socketTimeout - the socket timeout in milliseconds
      apiCallAttemptTimeout - the timeout for a single API call attempt in milliseconds
      apiCallTimeout - the timeout for the complete API call in milliseconds
      maxRetries - 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 endpoint
      bucketName - the bucket name
      accessKey - the S3 access key
      secretKey - the S3 secret key
      pathStyle - whether path-style access should be used
      region - the AWS region
      connectionTimeout - the connection timeout in milliseconds
      socketTimeout - the socket timeout in milliseconds
      apiCallAttemptTimeout - the timeout for a single API call attempt in milliseconds
      apiCallTimeout - the timeout for the complete API call in milliseconds
      maxRetries - the maximum number of retries
      maxConnections - the maximum number of pooled connections
      connectionAcquisitionTimeout - 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 endpoint
      bucketName - the bucket name
      accessKey - the access key
      secretKey - the secret key
      pathStyle - whether path-style access should be used
      Returns:
      the configuration
    • getAccessKey

      public String getAccessKey()
      Returns the access key.

      Returns:
      the access key
    • getApiCallAttemptTimeout

      Returns the single API call attempt timeout.

      Returns:
      the timeout in milliseconds
    • getApiCallTimeout

      public int 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

      public int getConnectionTimeout()
      Returns the connection timeout.

      Returns:
      the timeout in milliseconds
    • getEndpoint

      public String getEndpoint()
      Returns the endpoint.

      Returns:
      the endpoint
    • getMaxConnections

      public int getMaxConnections()
      Returns the maximum number of pooled connections.

      Returns:
      the maximum number of pooled connections
    • getMaxRetries

      public int getMaxRetries()
      Returns the maximum number of retries.

      Returns:
      the maximum number of retries
    • getRegion

      public String getRegion()
      Returns the configured AWS region.

      Returns:
      the AWS region
    • getSecretKey

      public String getSecretKey()
      Returns the secret key.

      Returns:
      the secret key
    • getSocketTimeout

      public int getSocketTimeout()
      Returns the socket timeout.

      Returns:
      the timeout in milliseconds
    • isPathStyle

      public boolean isPathStyle()
      Returns whether path-style access is configured.

      Returns:
      true if path-style access is configured