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
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.protected com.amazonaws.services.s3.AmazonS3Deprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.protected com.amazonaws.auth.AWSCredentialsProviderDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.protected StringDeprecated.protected StringDeprecated.protected com.amazonaws.ClientConfigurationDeprecated.static final StringDeprecated.AWS ClientConfiguration default 50static final StringDeprecated.AWS ClientConfiguration default 3 (with exponential backoff)static final StringDeprecated.AWS ClientConfiguration default 50*1000 = 50sprotected com.amazonaws.services.s3.model.CryptoConfigurationDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.protected com.amazonaws.services.s3.model.EncryptionMaterialsDeprecated.static final StringDeprecated.protected booleanDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.protected StringDeprecated.static final StringDeprecated.AWS ClientConfiguration default 50*1000 = 50sstatic final StringDeprecated.protected com.amazonaws.services.s3.transfer.TransferManagerDeprecated.static final StringDeprecated.static final StringDeprecated.protected booleanDeprecated.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, transientFlagFields inherited from class org.nuxeo.ecm.core.blob.binary.CachingBinaryManager
cachedir, fileCache, fileStorageFields 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_LENGTHFields inherited from interface org.nuxeo.ecm.core.blob.binary.BinaryManager
PROP_KEY, PROP_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated.protected voidDeprecated.Aborts uploads that crashed and are older than 1 day.booleanDeprecated.Used in the healthCheck; the transferManager should be initialized and the bucket accessiblevoidclear()Deprecated.INTERNAL (TESTS).voidclose()Deprecated.Closes the binary manager and releases all resources and temporary objects held by it.protected StringcopyBlob(S3BinaryManager sourceBlobProvider, String digest) Deprecated.Copies a blob.com.amazonaws.services.s3.AmazonS3Deprecated.Gets AmazonS3.com.amazonaws.auth.AWSCredentialsProviderDeprecated.Gets the AWSCredentialsProvider.Deprecated.Gets the bucket name.Deprecated.Gets the bucket prefix.protected FileStorageDeprecated.protected URIgetRemoteUri(String digest, ManagedBlob blob, javax.servlet.http.HttpServletRequest servletRequest) Deprecated.protected StringDeprecated.Gets the prefix used for configuration using system properties.com.amazonaws.services.s3.transfer.TransferManagerDeprecated.Returns theTransferManager.protected BinaryGarbageCollectorDeprecated.static booleanDeprecated.since 11.1, now unusedprotected static booleanisMissingKey(com.amazonaws.AmazonClientException e) Deprecated.longlengthOfBlob(String digest) Deprecated.voidremoveBinaries(Collection<String> digests) Deprecated.Remove definitively a set of binariesprotected voidremoveBinary(String digest) Deprecated.protected voidDeprecated.Configure Cloud client using propertiesprotected voidwaitForCopyCompletion(com.amazonaws.services.s3.transfer.Copy copy) Deprecated.Deprecated.Writes aBlobto 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, supportsUserUpdateDefaultTrueMethods inherited from class org.nuxeo.ecm.core.blob.binary.CachingBinaryManager
getBinary, getBinary, getFile, initializeCache, initializeCache, initializeCacheMethods inherited from class org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager
computeDigestPattern, getBinary, getDescriptor, getDigestAlgorithm, getGarbageCollector, isValidDigest, setDescriptor, storeAndDigest, toHexStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:BinaryManagerCloses the binary manager and releases all resources and temporary objects held by it.- Specified by:
closein interfaceBinaryManager- Specified by:
closein interfaceBlobProvider- Overrides:
closein 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:AbstractCloudBinaryManagerConfigure Cloud client using properties- Specified by:
setupCloudClientin classAbstractCloudBinaryManager- Throws:
IOException
-
getTransferManager
public com.amazonaws.services.s3.transfer.TransferManager getTransferManager()Deprecated.Description copied from interface:S3ManagedTransferReturns theTransferManager.- Specified by:
getTransferManagerin 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:AbstractCloudBinaryManagerGets the prefix used for configuration using system properties.- Specified by:
getSystemPropertyPrefixin classAbstractCloudBinaryManager
-
instantiateGarbageCollector
Deprecated.- Specified by:
instantiateGarbageCollectorin classAbstractCloudBinaryManager
-
removeBinaries
Deprecated.Description copied from interface:BinaryManagerRemove definitively a set of binaries- Specified by:
removeBinariesin interfaceBinaryManager- Specified by:
removeBinariesin 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:
getFileStoragein 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:BlobProviderWrites aBlobto storage and returns information about it.Called to store a user-created blob.
- Specified by:
writeBlobin interfaceBlobProvider- Overrides:
writeBlobin classAbstractCloudBinaryManager- Parameters:
blob- the blob- Returns:
- the blob key
- Throws:
IOException
-
copyBlob
Deprecated.Copies a blob. Returnsnullif the copy was not possible.- Parameters:
sourceBlobProvider- the source blob providerdigest- the source blob key- Returns:
- the copied blob key, or
nullif 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:
getRemoteUriin classAbstractCloudBinaryManager- Throws:
IOException
-
S3BlobProviderinstead