Package io.antmedia.storage
Class GCPStorageClient
java.lang.Object
io.antmedia.storage.StorageClient
io.antmedia.storage.GCPStorageClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.slf4j.Loggerprivate com.google.cloud.storage.StorageFields inherited from class io.antmedia.storage.StorageClient
BEAN_NAME, progressListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDelete file from storagevoiddeleteFile(File file) voiddeleteMultipleFiles(String key, String regex) Delete Multiple files from storagebooleanCheck if the key exists in the bucketcom.google.cloud.storage.Storagevoidreset()Re-initialize the storage client with the current parametersvoidSave file to storage and delete the local file according to the parametervoidsave(String key, InputStream inputStream, boolean waitForCompletion) Save input stream to the storage with key parameterMethods inherited from class io.antmedia.storage.StorageClient
get, getAccessKey, getCacheControl, getEndpoint, getPermission, getRegion, getSecretKey, getStorageClass, getStorageName, getTransferBufferSize, isEnabled, isPathStyleAccessEnabled, save, save, setAccessKey, setCacheControl, setEnabled, setEndpoint, setPathStyleAccessEnabled, setPermission, setProgressListener, setRegion, setSecretKey, setStorageClass, setStorageName, setTransferBufferSize
-
Field Details
-
logger
protected static org.slf4j.Logger logger -
storage
private com.google.cloud.storage.Storage storage
-
-
Constructor Details
-
GCPStorageClient
public GCPStorageClient()
-
-
Method Details
-
getGCPStorage
public com.google.cloud.storage.Storage getGCPStorage() -
deleteMultipleFiles
Description copied from class:StorageClientDelete Multiple files from storage- Specified by:
deleteMultipleFilesin classStorageClient
-
delete
Description copied from class:StorageClientDelete file from storage- Specified by:
deletein classStorageClient
-
fileExist
Description copied from class:StorageClientCheck if the key exists in the bucket- Specified by:
fileExistin classStorageClient- Returns:
-
save
Description copied from class:StorageClientSave input stream to the storage with key parameter- Specified by:
savein classStorageClient
-
save
Description copied from class:StorageClientSave file to storage and delete the local file according to the parameter- Specified by:
savein classStorageClient
-
deleteFile
-
reset
public void reset()Description copied from class:StorageClientRe-initialize the storage client with the current parameters- Specified by:
resetin classStorageClient
-