Package org.nuxeo.ecm.blob.s3
Class S3Utils
java.lang.Object
org.nuxeo.ecm.blob.s3.S3Utils
AWS S3 utilities.
- Since:
- 10.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Represents an operation that accepts a slice number and a slice begin and end position. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Deprecated.static final String
Deprecated.since 2021.11, useS3BlobStoreConfiguration.MULTIPART_COPY_PART_SIZE_PROPERTY
instead.static final long
The maximum size of a file that can be copied without using multipart: 5 GBstatic final long
Deprecated.since 11.1, useMULTIPART_COPY_PART_SIZE_DEFAULT
insteadprotected static final Pattern
-
Method Summary
Modifier and TypeMethodDescriptionstatic software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
getAwsCredentialsProvider
(String accessKeyId, String secretKey, String sessionToken) Gets the credentials providers for the given AWS key and secret.static Instant
getRestoreExpiryDate
(String restoreHeader) AWS SDK V2 does not have an API to get the expiry date of an expired object.static boolean
isOnGoingRestore
(String restoreHeader) AWS SDK V2 does not have an API to check if a S3 object is being restored.static void
processSlices
(long slice, long length, S3Utils.SliceConsumer consumer) Calls the consumer on all slices.static String
sanitizeETag
(String responseETag)
-
Field Details
-
RESTORE_EXPIRTION_REGEX
-
NON_MULTIPART_COPY_MAX_SIZE
public static final long NON_MULTIPART_COPY_MAX_SIZEThe maximum size of a file that can be copied without using multipart: 5 GB- See Also:
-
MULTIPART_COPY_PART_SIZE_DEFAULT
Deprecated.since 2021.11, useS3BlobStoreConfiguration.MULTIPART_COPY_PART_SIZE_DEFAULT
instead.The default multipart copy part size. This default is used only if the configuration service is not available or if the configuration property "nuxeo.s3.multipart.copy.part.size" is not defined.- Since:
- 11.1
- See Also:
-
PART_SIZE
Deprecated.since 11.1, useMULTIPART_COPY_PART_SIZE_DEFAULT
instead- See Also:
-
MULTIPART_COPY_PART_SIZE_PROPERTY
Deprecated.since 2021.11, useS3BlobStoreConfiguration.MULTIPART_COPY_PART_SIZE_PROPERTY
instead.The configuration property to define the multipart copy part size.- Since:
- 11.1
- See Also:
-
-
Method Details
-
processSlices
Calls the consumer on all slices.- Parameters:
slice
- the slice sizelength
- the total lengthconsumer
- the slice consumer
-
getAwsCredentialsProvider
public static software.amazon.awssdk.auth.credentials.AwsCredentialsProvider getAwsCredentialsProvider(String accessKeyId, String secretKey, String sessionToken) Gets the credentials providers for the given AWS key and secret.- Parameters:
accessKeyId
- the AWS access key idsecretKey
- the secret keysessionToken
- the session token (optional)- Since:
- 10.10
-
isOnGoingRestore
AWS SDK V2 does not have an API to check if a S3 object is being restored.- Returns:
- true if the restore header indicates a restore is in progress, false otherwise
- Since:
- 2025.0
-
getRestoreExpiryDate
AWS SDK V2 does not have an API to get the expiry date of an expired object.- Returns:
- the instant representing the expiry date if any, null otherwise
- Since:
- 2025.0
-
sanitizeETag
- Returns:
- the sanitized eTag
- Since:
- 2025.0
-
S3BlobStoreConfiguration.MULTIPART_COPY_PART_SIZE_DEFAULT
instead.