Class S3BinaryManager

All Implemented Interfaces:
S3ManagedTransfer, BinaryManager, BlobProvider
Direct Known Subclasses:
CloudFrontBinaryManager

@Deprecated(since="2023.9") public class S3BinaryManager extends AbstractCloudBinaryManager implements S3ManagedTransfer
Deprecated.
since 2023.9, use S3BlobProvider instead
A Binary Manager that stores binaries as S3 BLOBs

The BLOBs are cached locally on first access for efficiency.

Because the BLOB length can be accessed independently of the binary stream, it is also cached in a simple text file if accessed before the stream.

  • Field Details

    • SYSTEM_PROPERTY_PREFIX

      public static final String SYSTEM_PROPERTY_PREFIX
      Deprecated.
      See Also:
    • BUCKET_NAME_PROPERTY

      public static final String BUCKET_NAME_PROPERTY
      Deprecated.
      See Also:
    • BUCKET_PREFIX_PROPERTY

      public static final String BUCKET_PREFIX_PROPERTY
      Deprecated.
      See Also:
    • BUCKET_REGION_PROPERTY

      public static final String BUCKET_REGION_PROPERTY
      Deprecated.
      See Also:
    • AWS_ID_PROPERTY

      public static final String AWS_ID_PROPERTY
      Deprecated.
      See Also:
    • AWS_SECRET_PROPERTY

      public static final String AWS_SECRET_PROPERTY
      Deprecated.
      See Also:
    • AWS_SESSION_TOKEN_PROPERTY

      public static final String AWS_SESSION_TOKEN_PROPERTY
      Deprecated.
      Since:
      10.10
      See Also:
    • CONNECTION_MAX_PROPERTY

      public static final String CONNECTION_MAX_PROPERTY
      Deprecated.
      AWS ClientConfiguration default 50
      See Also:
    • CONNECTION_RETRY_PROPERTY

      public static final String CONNECTION_RETRY_PROPERTY
      Deprecated.
      AWS ClientConfiguration default 3 (with exponential backoff)
      See Also:
    • CONNECTION_TIMEOUT_PROPERTY

      public static final String CONNECTION_TIMEOUT_PROPERTY
      Deprecated.
      AWS ClientConfiguration default 50*1000 = 50s
      See Also:
    • SOCKET_TIMEOUT_PROPERTY

      public static final String SOCKET_TIMEOUT_PROPERTY
      Deprecated.
      AWS ClientConfiguration default 50*1000 = 50s
      See Also:
    • KEYSTORE_FILE_PROPERTY

      public static final String KEYSTORE_FILE_PROPERTY
      Deprecated.
      See Also:
    • KEYSTORE_PASS_PROPERTY

      public static final String KEYSTORE_PASS_PROPERTY
      Deprecated.
      See Also:
    • SERVERSIDE_ENCRYPTION_PROPERTY

      public static final String SERVERSIDE_ENCRYPTION_PROPERTY
      Deprecated.
      See Also:
    • SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY

      public static final String SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY
      Deprecated.
      See Also:
    • PRIVKEY_ALIAS_PROPERTY

      public static final String PRIVKEY_ALIAS_PROPERTY
      Deprecated.
      See Also:
    • PRIVKEY_PASS_PROPERTY

      public static final String PRIVKEY_PASS_PROPERTY
      Deprecated.
      See Also:
    • ENDPOINT_PROPERTY

      public static final String ENDPOINT_PROPERTY
      Deprecated.
      See Also:
    • PATHSTYLEACCESS_PROPERTY

      public static final String PATHSTYLEACCESS_PROPERTY
      Deprecated.
      Since:
      10.3
      See Also:
    • ACCELERATE_MODE_PROPERTY

      public static final String ACCELERATE_MODE_PROPERTY
      Deprecated.
      Since:
      11.1
      See Also:
    • DIRECTDOWNLOAD_PROPERTY_COMPAT

      public static final String DIRECTDOWNLOAD_PROPERTY_COMPAT
      Deprecated.
      See Also:
    • DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT

      public static final String DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT
      Deprecated.
      See Also:
    • USER_AGENT_PREFIX_PROPERTY

      public static final String USER_AGENT_PREFIX_PROPERTY
      Deprecated.
      Since:
      2021.15
      See Also:
    • USER_AGENT_SUFFIX_PROPERTY

      public static final String USER_AGENT_SUFFIX_PROPERTY
      Deprecated.
      Since:
      2021.15
      See Also:
    • DELIMITER

      public static final String DELIMITER
      Deprecated.
      See Also:
    • bucketName

      protected String bucketName
      Deprecated.
    • bucketNamePrefix

      protected String bucketNamePrefix
      Deprecated.
    • awsCredentialsProvider

      protected com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider
      Deprecated.
    • clientConfiguration

      protected com.amazonaws.ClientConfiguration clientConfiguration
      Deprecated.
    • encryptionMaterials

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

      protected boolean isEncrypted
      Deprecated.
    • cryptoConfiguration

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

      protected boolean useServerSideEncryption
      Deprecated.
    • serverSideKMSKeyID

      protected String serverSideKMSKeyID
      Deprecated.
    • amazonS3

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

      protected com.amazonaws.services.s3.transfer.TransferManager transferManager
      Deprecated.
  • Constructor Details

    • S3BinaryManager

      public S3BinaryManager()
      Deprecated.
  • Method Details

    • close

      public void close()
      Deprecated.
      Description copied from interface: BinaryManager
      Closes the binary manager and releases all resources and temporary objects held by it.
      Specified by:
      close in interface BinaryManager
      Specified by:
      close in interface BlobProvider
      Overrides:
      close in class CachingBinaryManager
    • abortOldUploads

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

      protected void abortOldMultipartUploadsInternal()
      Deprecated.
    • setupCloudClient

      protected void setupCloudClient() throws IOException
      Deprecated.
      Description copied from class: AbstractCloudBinaryManager
      Configure Cloud client using properties
      Specified by:
      setupCloudClient in class AbstractCloudBinaryManager
      Throws:
      IOException
    • getTransferManager

      public com.amazonaws.services.s3.transfer.TransferManager getTransferManager()
      Deprecated.
      Description copied from interface: S3ManagedTransfer
      Returns the TransferManager.
      Specified by:
      getTransferManager in interface S3ManagedTransfer
    • removeBinary

      protected void removeBinary(String digest)
      Deprecated.
    • clear

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

      protected String getSystemPropertyPrefix()
      Deprecated.
      Description copied from class: AbstractCloudBinaryManager
      Gets the prefix used for configuration using system properties.
      Specified by:
      getSystemPropertyPrefix in class AbstractCloudBinaryManager
    • instantiateGarbageCollector

      protected BinaryGarbageCollector instantiateGarbageCollector()
      Deprecated.
      Specified by:
      instantiateGarbageCollector in class AbstractCloudBinaryManager
    • removeBinaries

      public void removeBinaries(Collection<String> digests)
      Deprecated.
      Description copied from interface: BinaryManager
      Remove definitively a set of binaries
      Specified by:
      removeBinaries in interface BinaryManager
      Specified by:
      removeBinaries in class AbstractCloudBinaryManager
      Parameters:
      digests - a set of digests, must not be null.
    • lengthOfBlob

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

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

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

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

      protected FileStorage getFileStorage()
      Deprecated.
      Specified by:
      getFileStorage in class AbstractCloudBinaryManager
    • getAwsCredentialsProvider

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

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

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

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

      public String writeBlob(Blob blob) throws IOException
      Deprecated.
      Description copied from interface: BlobProvider
      Writes a Blob to storage and returns information about it.

      Called to store a user-created blob.

      Specified by:
      writeBlob in interface BlobProvider
      Overrides:
      writeBlob in class AbstractCloudBinaryManager
      Parameters:
      blob - the blob
      Returns:
      the blob key
      Throws:
      IOException
    • copyBlob

      protected String copyBlob(S3BinaryManager sourceBlobProvider, String digest) throws IOException
      Deprecated.
      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)
      Deprecated.
      Since:
      2021.15
    • getRemoteUri

      protected URI getRemoteUri(String digest, ManagedBlob blob, javax.servlet.http.HttpServletRequest servletRequest) throws IOException
      Deprecated.
      Overrides:
      getRemoteUri in class AbstractCloudBinaryManager
      Throws:
      IOException