Package org.nuxeo.ecm.blob.s3
Class S3BlobStoreConfiguration
java.lang.Object
org.nuxeo.ecm.core.blob.PropertyBasedConfiguration
org.nuxeo.ecm.core.blob.AbstractBlobStoreConfiguration
org.nuxeo.ecm.blob.CloudBlobStoreConfiguration
org.nuxeo.ecm.blob.s3.S3BlobStoreConfiguration
Blob storage configuration in S3.
- Since:
- 11.1
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringfinal com.amazonaws.services.s3.AmazonS3static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringfinal Stringfinal Stringstatic final Stringstatic final Stringfinal CloudFrontConfigurationstatic final StringAWS ClientConfiguration default 50static final StringAWS ClientConfiguration default 3 (with exponential backoff)static final StringAWS ClientConfiguration default 50*1000 = 50sstatic final com.amazonaws.services.s3.model.ObjectLockRetentionModestatic final Stringstatic final Stringstatic final Stringstatic final StringFramework property to disable usage of the proxy environment variables (nuxeo.http.proxy.*) for the connection to the S3 endpoint.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringfinal booleanstatic final longThe default value for the minimum upload part size.static final StringThe Framework property to define the minimum upload part size.static final StringDisable automatic abort of old multipart uploads at startup time.static final StringThe deprecated configuration property to define the multipart copy part size, for backward compatibility.static final longThe default value for the multipart copy part size.static final StringThe Framework property to define the multipart copy part size.static final longThe default value for the multipart copy threshold.static final StringThe Framework property to define the multipart copy threshold.static final longThe default value for the multipart upload threshold.static final StringThe Framework property to define the multipart upload threshold.protected final booleanIs backslash "/" the path separator.protected final PathStrategyThe path strategy according to the sub directory depth configuration.static final Stringstatic final Stringstatic final Stringfinal com.amazonaws.services.s3.model.ObjectLockRetentionModeThe retention mode to use when setting the retention on an object.final booleanIs Object Lock feature enabled at s3 level.static final Stringstatic final Stringfinal Stringstatic final StringAWS ClientConfiguration default 50*1000 = 50sstatic final Stringstatic final intThe default value for the transfer manager thread pool size.static final StringThe Framework property to define the transfer manager thread pool size.final com.amazonaws.services.s3.transfer.TransferManagerfinal booleanstatic final Stringstatic final Stringfinal booleanFields inherited from class org.nuxeo.ecm.blob.CloudBlobStoreConfigurationcachingConfiguration, DEFAULT_DIRECTDOWNLOAD_EXPIRE, DIGEST_ALGORITHM_PROPERTY, digestConfiguration, directDownload, DIRECTDOWNLOAD_EXPIRE_PROPERTY, DIRECTDOWNLOAD_PROPERTY, directDownloadExpireFields inherited from class org.nuxeo.ecm.core.blob.AbstractBlobStoreConfigurationnamespaceFields inherited from class org.nuxeo.ecm.core.blob.PropertyBasedConfigurationproperties, systemPropertyPrefix
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprotected voidAborts uploads that crashed and are older than 1 day.protected StringGets the bucket key for the given blob key taking into account the bucket prefix and the path strategy (sub directory depth).voidclose()protected com.amazonaws.services.s3.model.ObjectLockRetentionModeGets the s3 bucket's object lock default modeObjectLockRetentionMode#GOVERNANCEorObjectLockRetentionMode#COMPLIANCE.protected voidconfigureAccelerateMode(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) protected voidconfigurePathStyleAccess(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) protected voidconfigureRegionOrEndpoint(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) protected com.amazonaws.services.s3.transfer.TransferManagerprotected com.amazonaws.services.s3.AmazonS3getAmazonS3(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) protected com.amazonaws.auth.AWSCredentialsProviderprotected Stringprotected Stringprotected Stringprotected com.amazonaws.ClientConfigurationprotected com.amazonaws.services.s3.model.EncryptionMaterialsstatic longgetLongProperty(String key, long defaultValue) static longprotected com.amazonaws.services.s3.model.ObjectLockRetentionModeDeprecated.since 11.4, unusedprotected intprotected booleanDeprecated.since 2023.0, unusedprotected booleanprotected longwithNamespace(String ns) Returns a copy of the S3BlobStoreConfiguration with a different namespace.Methods inherited from class org.nuxeo.ecm.core.blob.AbstractBlobStoreConfigurationpropertiesWithNamespaceMethods inherited from class org.nuxeo.ecm.core.blob.PropertyBasedConfigurationgetBooleanProperty, getIntProperty, getIntProperty, getLongProperty, getProperty, getProperty
- 
Field Details- 
SYSTEM_PROPERTY_PREFIX- See Also:
 
- 
BUCKET_NAME_PROPERTY- See Also:
 
- 
BUCKET_PREFIX_PROPERTY- See Also:
 
- 
BUCKET_SUB_DIRS_DEPTH_PROPERTY- See Also:
 
- 
BUCKET_REGION_PROPERTY- See Also:
 
- 
AWS_ID_PROPERTY- See Also:
 
- 
AWS_SECRET_PROPERTY- See Also:
 
- 
AWS_SESSION_TOKEN_PROPERTY- See Also:
 
- 
CONNECTION_MAX_PROPERTYAWS ClientConfiguration default 50- See Also:
 
- 
CONNECTION_RETRY_PROPERTYAWS ClientConfiguration default 3 (with exponential backoff)- See Also:
 
- 
CONNECTION_TIMEOUT_PROPERTYAWS ClientConfiguration default 50*1000 = 50s- See Also:
 
- 
SOCKET_TIMEOUT_PROPERTYAWS ClientConfiguration default 50*1000 = 50s- See Also:
 
- 
KEYSTORE_FILE_PROPERTY- See Also:
 
- 
KEYSTORE_PASS_PROPERTY- See Also:
 
- 
KEYSTORE_LEGACY_MODE_PROPERTY- Since:
- 2023.18
- See Also:
 
- 
SERVERSIDE_ENCRYPTION_PROPERTY- See Also:
 
- 
SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY- See Also:
 
- 
CLIENTSIDE_ENCRYPTION_KMS_KEY_PROPERTY- Since:
- 2023.17
- See Also:
 
- 
CLIENTSIDE_ENCRYPTION_KMS_REGION_PROPERTY- Since:
- 2023.17
- See Also:
 
- 
PRIVKEY_ALIAS_PROPERTY- See Also:
 
- 
PRIVKEY_PASS_PROPERTY- See Also:
 
- 
ENDPOINT_PROPERTY- See Also:
 
- 
PATHSTYLEACCESS_PROPERTY- See Also:
 
- 
ACCELERATE_MODE_PROPERTY- See Also:
 
- 
DIRECTDOWNLOAD_PROPERTY_COMPAT- See Also:
 
- 
DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT- See Also:
 
- 
METADATA_ADD_USERNAME_PROPERTY- See Also:
 
- 
MULTIPART_CLEANUP_DISABLED_PROPERTYDisable automatic abort of old multipart uploads at startup time.- Since:
- 11.1
- See Also:
 
- 
DELIMITER- See Also:
 
- 
MULTIPART_COPY_PART_SIZE_CONFIGURATION_PROPERTYThe deprecated configuration property to define the multipart copy part size, for backward compatibility.- Since:
- 2021.11
- See Also:
 
- 
MULTIPART_COPY_PART_SIZE_PROPERTYThe Framework property to define the multipart copy part size.- See Also:
 
- 
MULTIPART_COPY_PART_SIZE_DEFAULTpublic static final long MULTIPART_COPY_PART_SIZE_DEFAULTThe default value for the multipart copy part size.- Since:
- 2021.11
- See Also:
 
- 
MULTIPART_COPY_THRESHOLD_PROPERTYThe Framework property to define the multipart copy threshold.- Since:
- 2021.11
- See Also:
 
- 
MULTIPART_COPY_THRESHOLD_DEFAULTpublic static final long MULTIPART_COPY_THRESHOLD_DEFAULTThe default value for the multipart copy threshold.- Since:
- 2021.11
- See Also:
 
- 
MULTIPART_UPLOAD_THRESHOLD_PROPERTYThe Framework property to define the multipart upload threshold.- Since:
- 2021.11
- See Also:
 
- 
MULTIPART_UPLOAD_THRESHOLD_DEFAULTpublic static final long MULTIPART_UPLOAD_THRESHOLD_DEFAULTThe default value for the multipart upload threshold.- Since:
- 2021.11
- See Also:
 
- 
MINIMUM_UPLOAD_PART_SIZE_PROPERTYThe Framework property to define the minimum upload part size.- Since:
- 2021.11
- See Also:
 
- 
MINIMUM_UPLOAD_PART_SIZE_DEFAULTpublic static final long MINIMUM_UPLOAD_PART_SIZE_DEFAULTThe default value for the minimum upload part size.- Since:
- 2021.11
- See Also:
 
- 
TRANSFER_MANAGER_THREAD_POOL_SIZE_PROPERTYThe Framework property to define the transfer manager thread pool size.- Since:
- 2021.14
- See Also:
 
- 
TRANSFER_MANAGER_THREAD_POOL_SIZE_DEFAULTpublic static final int TRANSFER_MANAGER_THREAD_POOL_SIZE_DEFAULTThe default value for the transfer manager thread pool size.- Since:
- 2021.14
- See Also:
 
- 
DISABLE_PROXY_PROPERTYFramework property to disable usage of the proxy environment variables (nuxeo.http.proxy.*) for the connection to the S3 endpoint.- Since:
- 11.1
- See Also:
 
- 
USER_AGENT_PREFIX_PROPERTY- Since:
- 2021.15
- See Also:
 
- 
USER_AGENT_SUFFIX_PROPERTY- Since:
- 2021.15
- See Also:
 
- 
DEFAULT_RETENTION_MODEpublic static final com.amazonaws.services.s3.model.ObjectLockRetentionMode DEFAULT_RETENTION_MODE
- 
cloudFront
- 
amazonS3public final com.amazonaws.services.s3.AmazonS3 amazonS3
- 
transferManagerpublic final com.amazonaws.services.s3.transfer.TransferManager transferManager
- 
bucketName
- 
bucketPrefix
- 
useServerSideEncryptionpublic final boolean useServerSideEncryption
- 
serverSideKMSKeyID
- 
useClientSideEncryptionpublic final boolean useClientSideEncryption
- 
metadataAddUsernamepublic final boolean metadataAddUsername
- 
s3RetentionEnabledpublic final boolean s3RetentionEnabledIs Object Lock feature enabled at s3 level.- Since:
- 2021.13
 
- 
retentionModepublic final com.amazonaws.services.s3.model.ObjectLockRetentionMode retentionModeThe retention mode to use when setting the retention on an object.
- 
pathStrategyThe path strategy according to the sub directory depth configuration.- Since:
- 2023.7
 
- 
pathSeparatorIsBackslashprotected final boolean pathSeparatorIsBackslashIs backslash "/" the path separator.- Since:
- 2023.7
 
 
- 
- 
Constructor Details- 
S3BlobStoreConfiguration- Throws:
- IOException
 
 
- 
- 
Method Details- 
computeBucketRetentionModeprotected com.amazonaws.services.s3.model.ObjectLockRetentionMode computeBucketRetentionMode()Gets the s3 bucket's object lock default modeObjectLockRetentionMode#GOVERNANCEorObjectLockRetentionMode#COMPLIANCE.If undefined, the retention mode of the Nuxeo platform is returned. Returns null if object lock is not enabled on the bucket. - Since:
- 2023.0
 
- 
withNamespaceReturns a copy of the S3BlobStoreConfiguration with a different namespace.- Throws:
- IOException
 
- 
closepublic void close()
- 
getMultipartCopyPartSizepublic static long getMultipartCopyPartSize()- Since:
- 2021.11
 
- 
getLongProperty- Since:
- 2021.11
 
- 
parseDirectDownloadprotected boolean parseDirectDownload()- Overrides:
- parseDirectDownloadin class- CloudBlobStoreConfiguration
 
- 
parseDirectDownloadExpireprotected long parseDirectDownloadExpire()- Overrides:
- parseDirectDownloadExpirein class- CloudBlobStoreConfiguration
 
- 
getBucketName
- 
bucketKeyGets the bucket key for the given blob key taking into account the bucket prefix and the path strategy (sub directory depth).- Since:
- 2023.7
 
- 
getBucketPrefix
- 
getSubDirsDepthprotected int getSubDirsDepth()
- 
getAWSCredentialsProviderprotected com.amazonaws.auth.AWSCredentialsProvider getAWSCredentialsProvider()
- 
getClientConfigurationprotected com.amazonaws.ClientConfiguration getClientConfiguration()
- 
getEncryptionMaterialsprotected com.amazonaws.services.s3.model.EncryptionMaterials getEncryptionMaterials()
- 
configurePathStyleAccessprotected void configurePathStyleAccess(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) 
- 
configureRegionOrEndpointprotected void configureRegionOrEndpoint(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) 
- 
getBucketRegion
- 
configureAccelerateModeprotected void configureAccelerateMode(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) 
- 
getAmazonS3protected com.amazonaws.services.s3.AmazonS3 getAmazonS3(com.amazonaws.services.s3.AmazonS3Builder<?, ?> s3Builder) 
- 
createTransferManagerprotected com.amazonaws.services.s3.transfer.TransferManager createTransferManager()
- 
getRetentionModeDeprecated.since 11.4, unused
- 
isS3RetentionEnabledDeprecated.since 2023.0, unused
- 
abortOldUploadsprotected void abortOldUploads()Aborts uploads that crashed and are older than 1 day.
- 
abortOldMultipartUploadsInternalprotected void abortOldMultipartUploadsInternal()
 
-