Package org.nuxeo.ecm.core.storage.sql
Class S3BinaryManager
java.lang.Object
org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager
org.nuxeo.ecm.core.blob.binary.CachingBinaryManager
org.nuxeo.ecm.blob.AbstractCloudBinaryManager
org.nuxeo.ecm.core.storage.sql.S3BinaryManager
- All Implemented Interfaces:
S3ManagedTransfer
,BinaryManager
,BlobProvider
- Direct Known Subclasses:
CloudFrontBinaryManager
@Deprecated(since="2023.9")
public class S3BinaryManager
extends AbstractCloudBinaryManager
implements S3ManagedTransfer
Deprecated.
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated.class
Deprecated. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.protected com.amazonaws.services.s3.AmazonS3
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.protected com.amazonaws.auth.AWSCredentialsProvider
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected com.amazonaws.ClientConfiguration
Deprecated.static final String
Deprecated.AWS ClientConfiguration default 50static final String
Deprecated.AWS ClientConfiguration default 3 (with exponential backoff)static final String
Deprecated.AWS ClientConfiguration default 50*1000 = 50sprotected com.amazonaws.services.s3.model.CryptoConfiguration
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.protected com.amazonaws.services.s3.model.EncryptionMaterials
Deprecated.static final String
Deprecated.protected boolean
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.protected String
Deprecated.static final String
Deprecated.AWS ClientConfiguration default 50*1000 = 50sstatic final String
Deprecated.protected com.amazonaws.services.s3.transfer.TransferManager
Deprecated.static final String
Deprecated.static final String
Deprecated.protected boolean
Deprecated.Fields inherited from class org.nuxeo.ecm.blob.AbstractCloudBinaryManager
CACHE_COUNT_PROPERTY, CACHE_MIN_AGE_PROPERTY, CACHE_SIZE_PROPERTY, DEFAULT_CACHE_COUNT, DEFAULT_CACHE_MIN_AGE, DEFAULT_CACHE_SIZE, DEFAULT_DIRECTDOWNLOAD, DEFAULT_DIRECTDOWNLOAD_EXPIRE, DIGEST_ALGORITHM_PROPERTY, directDownload, DIRECTDOWNLOAD_EXPIRE_PROPERTY, DIRECTDOWNLOAD_PROPERTY, directDownloadExpire, namespace, transientFlag
Fields inherited from class org.nuxeo.ecm.core.blob.binary.CachingBinaryManager
cachedir, fileCache, fileStorage
Fields inherited from class org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager
blobProviderId, DEFAULT_DEPTH, DEFAULT_DIGEST, descriptor, digestPattern, DIGESTS_BY_LENGTH, garbageCollector, MAX_BUF_SIZE, MD5_DIGEST, MD5_DIGEST_LENGTH, MIN_BUF_SIZE, properties, SHA1_DIGEST, SHA1_DIGEST_LENGTH, SHA256_DIGEST, SHA256_DIGEST_LENGTH
Fields inherited from interface org.nuxeo.ecm.core.blob.binary.BinaryManager
PROP_KEY, PROP_PATH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Deprecated.protected void
Deprecated.Aborts uploads that crashed and are older than 1 day.boolean
Deprecated.Used in the healthCheck; the transferManager should be initialized and the bucket accessiblevoid
clear()
Deprecated.INTERNAL (TESTS).void
close()
Deprecated.Closes the binary manager and releases all resources and temporary objects held by it.protected String
copyBlob
(S3BinaryManager sourceBlobProvider, String digest) Deprecated.Copies a blob.com.amazonaws.services.s3.AmazonS3
Deprecated.Gets AmazonS3.com.amazonaws.auth.AWSCredentialsProvider
Deprecated.Gets the AWSCredentialsProvider.Deprecated.Gets the bucket name.Deprecated.Gets the bucket prefix.protected FileStorage
Deprecated.protected URI
getRemoteUri
(String digest, ManagedBlob blob, javax.servlet.http.HttpServletRequest servletRequest) Deprecated.protected String
Deprecated.Gets the prefix used for configuration using system properties.com.amazonaws.services.s3.transfer.TransferManager
Deprecated.Returns theTransferManager
.protected BinaryGarbageCollector
Deprecated.static boolean
Deprecated.since 11.1, now unusedprotected static boolean
isMissingKey
(com.amazonaws.AmazonClientException e) Deprecated.long
lengthOfBlob
(String digest) Deprecated.void
removeBinaries
(Collection<String> digests) Deprecated.Remove definitively a set of binariesprotected void
removeBinary
(String digest) Deprecated.protected void
Deprecated.Configure Cloud client using propertiesprotected void
waitForCopyCompletion
(com.amazonaws.services.s3.transfer.Copy copy) Deprecated.Deprecated.Writes aBlob
to storage and returns information about it.Methods inherited from class org.nuxeo.ecm.blob.AbstractCloudBinaryManager
getBinaryManager, getBooleanProperty, getContentDispositionHeader, getContentTypeHeader, getDefaultDigestAlgorithm, getIntProperty, getIntProperty, getProperties, getProperty, getProperty, getSystemPropertyName, getURI, initialize, isDirectDownload, isTransient, performsExternalAccessControl, readBlob, supportsUserUpdate, supportsUserUpdateDefaultTrue
Methods inherited from class org.nuxeo.ecm.core.blob.binary.CachingBinaryManager
getBinary, getBinary, getFile, initializeCache, initializeCache, initializeCache
Methods inherited from class org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager
computeDigestPattern, getBinary, getDescriptor, getDigestAlgorithm, getGarbageCollector, isValidDigest, setDescriptor, storeAndDigest, toHexString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.core.blob.BlobProvider
allowByteRange, allowDirectDownload, canConvert, deleteBlob, getAppLinks, getAvailableConversions, getBinaryGarbageCollector, getFile, getStatus, getStream, getStream, getThumbnail, hasCreateFromKeyPermission, isColdStorageMode, isRecordMode, isTransactional, isVersion, readBlob, supportsSync, updateBlob, writeBlob
-
Field Details
-
SYSTEM_PROPERTY_PREFIX
Deprecated.- See Also:
-
BUCKET_NAME_PROPERTY
Deprecated.- See Also:
-
BUCKET_PREFIX_PROPERTY
Deprecated.- See Also:
-
BUCKET_REGION_PROPERTY
Deprecated.- See Also:
-
AWS_ID_PROPERTY
Deprecated.- See Also:
-
AWS_SECRET_PROPERTY
Deprecated.- See Also:
-
AWS_SESSION_TOKEN_PROPERTY
Deprecated.- Since:
- 10.10
- See Also:
-
CONNECTION_MAX_PROPERTY
Deprecated.AWS ClientConfiguration default 50- See Also:
-
CONNECTION_RETRY_PROPERTY
Deprecated.AWS ClientConfiguration default 3 (with exponential backoff)- See Also:
-
CONNECTION_TIMEOUT_PROPERTY
Deprecated.AWS ClientConfiguration default 50*1000 = 50s- See Also:
-
SOCKET_TIMEOUT_PROPERTY
Deprecated.AWS ClientConfiguration default 50*1000 = 50s- See Also:
-
KEYSTORE_FILE_PROPERTY
Deprecated.- See Also:
-
KEYSTORE_PASS_PROPERTY
Deprecated.- See Also:
-
SERVERSIDE_ENCRYPTION_PROPERTY
Deprecated.- See Also:
-
SERVERSIDE_ENCRYPTION_KMS_KEY_PROPERTY
Deprecated.- See Also:
-
PRIVKEY_ALIAS_PROPERTY
Deprecated.- See Also:
-
PRIVKEY_PASS_PROPERTY
Deprecated.- See Also:
-
ENDPOINT_PROPERTY
Deprecated.- See Also:
-
PATHSTYLEACCESS_PROPERTY
Deprecated.- Since:
- 10.3
- See Also:
-
ACCELERATE_MODE_PROPERTY
Deprecated.- Since:
- 11.1
- See Also:
-
DIRECTDOWNLOAD_PROPERTY_COMPAT
Deprecated.- See Also:
-
DIRECTDOWNLOAD_EXPIRE_PROPERTY_COMPAT
Deprecated.- See Also:
-
USER_AGENT_PREFIX_PROPERTY
Deprecated.- Since:
- 2021.15
- See Also:
-
USER_AGENT_SUFFIX_PROPERTY
Deprecated.- Since:
- 2021.15
- See Also:
-
DELIMITER
Deprecated.- See Also:
-
bucketName
Deprecated. -
bucketNamePrefix
Deprecated. -
awsCredentialsProvider
protected com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProviderDeprecated. -
clientConfiguration
protected com.amazonaws.ClientConfiguration clientConfigurationDeprecated. -
encryptionMaterials
protected com.amazonaws.services.s3.model.EncryptionMaterials encryptionMaterialsDeprecated. -
isEncrypted
protected boolean isEncryptedDeprecated. -
cryptoConfiguration
protected com.amazonaws.services.s3.model.CryptoConfiguration cryptoConfigurationDeprecated. -
useServerSideEncryption
protected boolean useServerSideEncryptionDeprecated. -
serverSideKMSKeyID
Deprecated. -
amazonS3
protected com.amazonaws.services.s3.AmazonS3 amazonS3Deprecated. -
transferManager
protected com.amazonaws.services.s3.transfer.TransferManager transferManagerDeprecated.
-
-
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 interfaceBinaryManager
- Specified by:
close
in interfaceBlobProvider
- Overrides:
close
in classCachingBinaryManager
-
abortOldUploads
protected void abortOldUploads()Deprecated.Aborts uploads that crashed and are older than 1 day.- Since:
- 7.2
-
abortOldMultipartUploadsInternal
protected void abortOldMultipartUploadsInternal()Deprecated. -
setupCloudClient
Deprecated.Description copied from class:AbstractCloudBinaryManager
Configure Cloud client using properties- Specified by:
setupCloudClient
in classAbstractCloudBinaryManager
- Throws:
IOException
-
getTransferManager
public com.amazonaws.services.s3.transfer.TransferManager getTransferManager()Deprecated.Description copied from interface:S3ManagedTransfer
Returns theTransferManager
.- Specified by:
getTransferManager
in interfaceS3ManagedTransfer
-
removeBinary
Deprecated. -
clear
public void clear()Deprecated.INTERNAL (TESTS). Clears the binary manager of all its data.- Since:
- 11.5
-
getSystemPropertyPrefix
Deprecated.Description copied from class:AbstractCloudBinaryManager
Gets the prefix used for configuration using system properties.- Specified by:
getSystemPropertyPrefix
in classAbstractCloudBinaryManager
-
instantiateGarbageCollector
Deprecated.- Specified by:
instantiateGarbageCollector
in classAbstractCloudBinaryManager
-
removeBinaries
Deprecated.Description copied from interface:BinaryManager
Remove definitively a set of binaries- Specified by:
removeBinaries
in interfaceBinaryManager
- Specified by:
removeBinaries
in classAbstractCloudBinaryManager
- Parameters:
digests
- a set of digests, must not benull
.
-
lengthOfBlob
Deprecated.- Returns:
- object length, or -1 if missing
-
isMissingKey
protected static boolean isMissingKey(com.amazonaws.AmazonClientException e) Deprecated. -
isMD5
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
Deprecated.- Specified by:
getFileStorage
in classAbstractCloudBinaryManager
-
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
Deprecated.Gets the bucket name.- Since:
- 11.1
-
getBucketPrefix
Deprecated.Gets the bucket prefix.- Since:
- 11.1
-
writeBlob
Deprecated.Description copied from interface:BlobProvider
Writes aBlob
to storage and returns information about it.Called to store a user-created blob.
- Specified by:
writeBlob
in interfaceBlobProvider
- Overrides:
writeBlob
in classAbstractCloudBinaryManager
- Parameters:
blob
- the blob- Returns:
- the blob key
- Throws:
IOException
-
copyBlob
Deprecated.Copies a blob. Returnsnull
if the copy was not possible.- Parameters:
sourceBlobProvider
- the source blob providerdigest
- 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 classAbstractCloudBinaryManager
- Throws:
IOException
-
S3BlobProvider
instead