Class PosixAtomicFileCopier

java.lang.Object
de.dlr.proseo.storagemgr.posix.PosixAtomicFileCopier
All Implemented Interfaces:
AtomicCommand<String>

public class PosixAtomicFileCopier extends Object implements AtomicCommand<String>
Posix Atomic File Copier from some POSIX absolute path to another POSIX absolute path (normally, to cache)
Author:
Denys Chaykovskiy
  • Constructor Details

    • PosixAtomicFileCopier

      public PosixAtomicFileCopier(String sourceFile, String targetFileOrDir)
      Constructor
      Parameters:
      sourceFile - sourceFile
      targetFileOrDir - target file or directory
  • Method Details

    • execute

      public String execute() throws IOException
      Executes copy of the file from a posix path to a posix path (normally, to the cache)
      Specified by:
      execute in interface AtomicCommand<String>
      Returns:
      copied file name
      Throws:
      IOException - if atomic command was not successful
    • getInfo

      public String getInfo()
      Gets information about atomic command (mostly for logs)
      Specified by:
      getInfo in interface AtomicCommand<String>
      Returns:
      information about atomic command
    • getCompletedInfo

      public String getCompletedInfo()
      Gets information about completed atomic command (mostly for logs)
      Specified by:
      getCompletedInfo in interface AtomicCommand<String>
      Returns:
      information about completed atomic command
    • getFailedInfo

      public String getFailedInfo()
      Gets information about failed atomic command (mostly for logs)
      Specified by:
      getFailedInfo in interface AtomicCommand<String>
      Returns:
      information about failed atomic command