Package io.antmedia.storage
Class AmazonS3StorageClient
java.lang.Object
io.antmedia.storage.StorageClient
io.antmedia.storage.AmazonS3StorageClient
-
Field Summary
Modifier and TypeFieldDescriptionprivate com.amazonaws.services.s3.AmazonS3
protected static org.slf4j.Logger
private long
private com.amazonaws.services.s3.transfer.TransferManager
Fields inherited from class io.antmedia.storage.StorageClient
BEAN_NAME, progressListener
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkStorageClass
(String s3StorageClass) void
convert2List
(List<String> list, List<com.amazonaws.services.s3.model.S3ObjectSummary> objectSummaries) void
Delete file from storagevoid
deleteFile
(File file) boolean
Check if the key exists in the bucketcom.amazonaws.services.s3.AmazonS3
com.amazonaws.services.s3.model.CannedAccessControlList
long
getObjects
(String prefix) com.amazonaws.services.s3.transfer.TransferManager
com.amazonaws.services.s3.AmazonS3
void
listenUploadProgress
(String key, File file, boolean deleteLocalFile, com.amazonaws.services.s3.transfer.Upload upload) void
reset()
Re-initialize the storage client with the current parametersvoid
void
Save file to storage and delete the local file according to the parametervoid
save
(String key, File file, InputStream inputStream, boolean deleteLocalFile, boolean waitForCompletion) void
save
(String key, InputStream inputStream, boolean waitForCompletion) Save input stream to the storage with key parametervoid
setMultipartUploadThreshold
(long multipartUploadThreshold) Methods inherited from class io.antmedia.storage.StorageClient
getAccessKey, getCacheControl, getEndpoint, getPermission, getRegion, getSecretKey, getStorageClass, getStorageName, getTransferBufferSize, isEnabled, isPathStyleAccessEnabled, save, setAccessKey, setCacheControl, setEnabled, setEndpoint, setPathStyleAccessEnabled, setPermission, setProgressListener, setRegion, setSecretKey, setStorageClass, setStorageName, setTransferBufferSize
-
Field Details
-
amazonS3
private com.amazonaws.services.s3.AmazonS3 amazonS3 -
transferManager
private com.amazonaws.services.s3.transfer.TransferManager transferManager -
multipartUploadThreshold
private long multipartUploadThreshold -
logger
protected static org.slf4j.Logger logger
-
-
Constructor Details
-
AmazonS3StorageClient
public AmazonS3StorageClient()
-
-
Method Details
-
getAmazonS3
public com.amazonaws.services.s3.AmazonS3 getAmazonS3() -
initAmazonS3
public com.amazonaws.services.s3.AmazonS3 initAmazonS3() -
getObjects
-
convert2List
-
delete
Description copied from class:StorageClient
Delete file from storage- Specified by:
delete
in classStorageClient
-
fileExist
Description copied from class:StorageClient
Check if the key exists in the bucket- Specified by:
fileExist
in classStorageClient
- Returns:
-
save
-
save
Description copied from class:StorageClient
Save input stream to the storage with key parameter- Specified by:
save
in classStorageClient
-
save
Description copied from class:StorageClient
Save file to storage and delete the local file according to the parameter- Specified by:
save
in classStorageClient
-
save
public void save(String key, File file, InputStream inputStream, boolean deleteLocalFile, boolean waitForCompletion) -
listenUploadProgress
-
checkStorageClass
-
getTransferManager
public com.amazonaws.services.s3.transfer.TransferManager getTransferManager() -
deleteFile
-
reset
public void reset()Description copied from class:StorageClient
Re-initialize the storage client with the current parameters- Specified by:
reset
in classStorageClient
-
getCannedAcl
public com.amazonaws.services.s3.model.CannedAccessControlList getCannedAcl() -
getMultipartUploadThreshold
public long getMultipartUploadThreshold() -
setMultipartUploadThreshold
public void setMultipartUploadThreshold(long multipartUploadThreshold)
-