public abstract class S3FileSystemBase extends AbstractFileSystem
backupMetrics, pathProvider
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Runs cleanup or set retention
|
void |
configChangeListener() |
void |
deleteFiles(java.util.List<java.nio.file.Path> remotePaths) |
protected boolean |
doesRemoteFileExist(java.nio.file.Path remotePath) |
long |
getFileSize(java.lang.String remotePath)
Get the size of the remote object
|
java.util.Iterator<java.lang.String> |
listFileSystem(java.lang.String prefix,
java.lang.String delimiter,
java.lang.String marker)
List all the files with the given prefix, delimiter, and marker.
|
void |
setS3Client(com.amazonaws.services.s3.AmazonS3 client) |
void |
shutdown()
Give the file system a chance to terminate any thread pools, etc.
|
addObserver, asyncDownloadFile, asyncUploadAndDelete, checkObjectExists, clearCache, deleteRemoteFiles, downloadFile, downloadFileImpl, getDownloadTasksQueued, getPrefix, getShard, getUploadTasksQueued, list, listPrefixes, notifyEventFailure, notifyEventStart, notifyEventStop, notifyEventSuccess, removeObserver, uploadAndDelete, uploadFileImpl
public void configChangeListener()
public void setS3Client(com.amazonaws.services.s3.AmazonS3 client)
public void cleanup()
IBackupFileSystem
public long getFileSize(java.lang.String remotePath) throws BackupRestoreException
IBackupFileSystem
remotePath
- Location of the object on the remote file system.BackupRestoreException
- in case of failure to read object denoted by remotePath or any
other error.protected boolean doesRemoteFileExist(java.nio.file.Path remotePath)
doesRemoteFileExist
in class AbstractFileSystem
public void shutdown()
IBackupFileSystem
public java.util.Iterator<java.lang.String> listFileSystem(java.lang.String prefix, java.lang.String delimiter, java.lang.String marker)
IBackupFileSystem
prefix
- Common prefix of the elements to search in the backup file system.delimiter
- All the object will end with this delimiter.marker
- Start the fetch with this as the first object.public void deleteFiles(java.util.List<java.nio.file.Path> remotePaths) throws BackupRestoreException
deleteFiles
in class AbstractFileSystem
BackupRestoreException