Package de.dlr.proseo.storagemgr.posix
Class PosixAtomicFileCopier
java.lang.Object
de.dlr.proseo.storagemgr.posix.PosixAtomicFileCopier
- All Implemented Interfaces:
AtomicCommand<String>
Posix Atomic File Copier from some POSIX absolute path to another POSIX absolute path (normally, to cache)
- Author:
- Denys Chaykovskiy
-
Constructor Summary
ConstructorsConstructorDescriptionPosixAtomicFileCopier(String sourceFile, String targetFileOrDir) Constructor -
Method Summary
Modifier and TypeMethodDescriptionexecute()Executes copy of the file from a posix path to a posix path (normally, to the cache)Gets information about completed atomic command (mostly for logs)Gets information about failed atomic command (mostly for logs)getInfo()Gets information about atomic command (mostly for logs)
-
Constructor Details
-
PosixAtomicFileCopier
Constructor- Parameters:
sourceFile- sourceFiletargetFileOrDir- target file or directory
-
-
Method Details
-
execute
Executes copy of the file from a posix path to a posix path (normally, to the cache)- Specified by:
executein interfaceAtomicCommand<String>- Returns:
- copied file name
- Throws:
IOException- if atomic command was not successful
-
getInfo
Gets information about atomic command (mostly for logs)- Specified by:
getInfoin interfaceAtomicCommand<String>- Returns:
- information about atomic command
-
getCompletedInfo
Gets information about completed atomic command (mostly for logs)- Specified by:
getCompletedInfoin interfaceAtomicCommand<String>- Returns:
- information about completed atomic command
-
getFailedInfo
Gets information about failed atomic command (mostly for logs)- Specified by:
getFailedInfoin interfaceAtomicCommand<String>- Returns:
- information about failed atomic command
-