Class S3BinaryManager

    • Field Detail

      • CONNECTION_MAX_PROPERTY

        public static final String CONNECTION_MAX_PROPERTY
        AWS ClientConfiguration default 50
        See Also:
        Constant Field Values
      • CONNECTION_RETRY_PROPERTY

        public static final String CONNECTION_RETRY_PROPERTY
        AWS ClientConfiguration default 3 (with exponential backoff)
        See Also:
        Constant Field Values
      • CONNECTION_TIMEOUT_PROPERTY

        public static final String CONNECTION_TIMEOUT_PROPERTY
        AWS ClientConfiguration default 50*1000 = 50s
        See Also:
        Constant Field Values
      • SOCKET_TIMEOUT_PROPERTY

        public static final String SOCKET_TIMEOUT_PROPERTY
        AWS ClientConfiguration default 50*1000 = 50s
        See Also:
        Constant Field Values
      • SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY

        public static final String SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY
        See Also:
        Constant Field Values
      • DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT

        public static final String DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT
        See Also:
        Constant Field Values
      • bucketName

        protected String bucketName
      • bucketNamePrefix

        protected String bucketNamePrefix
      • awsCredentialsProvider

        protected com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider
      • clientConfiguration

        protected com.amazonaws.ClientConfiguration clientConfiguration
      • encryptionMaterials

        protected com.amazonaws.services.s3.model.EncryptionMaterials encryptionMaterials
      • isEncrypted

        protected boolean isEncrypted
      • cryptoConfiguration

        protected com.amazonaws.services.s3.model.CryptoConfiguration cryptoConfiguration
      • useServerSideEncryption

        protected boolean useServerSideEncryption
      • serverSideKMSKeyID

        protected String serverSideKMSKeyID
      • amazonS3

        protected com.amazonaws.services.s3.AmazonS3 amazonS3
      • transferManager

        protected com.amazonaws.services.s3.transfer.TransferManager transferManager
    • Constructor Detail

      • S3BinaryManager

        public S3BinaryManager()
    • Method Detail

      • abortOldUploads

        protected void abortOldUploads()
        Aborts uploads that crashed and are older than 1 day.
        Since:
        7.2
      • abortOldMultipartUploadsInternal

        protected void abortOldMultipartUploadsInternal()
      • removeBinary

        protected void removeBinary​(String digest)
      • clear

        public void clear()
        INTERNAL (TESTS). Clears the binary manager of all its data.
        Since:
        11.5
      • lengthOfBlob

        public long lengthOfBlob​(String digest)
        Returns:
        object length, or -1 if missing
      • isMissingKey

        protected static boolean isMissingKey​(com.amazonaws.AmazonClientException e)
      • isMD5

        @Deprecated
        public static boolean isMD5​(String digest)
        Deprecated.
        since 11.1, now unused
      • canAccessBucket

        public boolean canAccessBucket()
        Used in the healthCheck; the transferManager should be initialized and the bucket accessible
        Since:
        9.3
      • getAwsCredentialsProvider

        public com.amazonaws.auth.AWSCredentialsProvider getAwsCredentialsProvider()
        Gets the AWSCredentialsProvider.
        Since:
        10.2
      • getAmazonS3

        public com.amazonaws.services.s3.AmazonS3 getAmazonS3()
        Gets AmazonS3.
        Since:
        10.2
      • getBucketName

        public String getBucketName()
        Gets the bucket name.
        Since:
        11.1
      • getBucketPrefix

        public String getBucketPrefix()
        Gets the bucket prefix.
        Since:
        11.1
      • copyBlob

        protected String copyBlob​(S3BinaryManager sourceBlobProvider,
                                  String digest)
                           throws IOException
        Copies a blob. Returns null if the copy was not possible.
        Parameters:
        sourceBlobProvider - the source blob provider
        digest - the source blob key
        Returns:
        the copied blob key, or null if the copy was not possible
        Throws:
        IOException
        Since:
        10.1
      • waitForCopyCompletion

        protected void waitForCopyCompletion​(com.amazonaws.services.s3.transfer.Copy copy)
        Since:
        2021.15