src/main/java/saps/common/core/storage/swift/SwiftPermanentStorage.java
/**
   * This function tries upload a task folder file to Swift.
   *
   * @param actualFile file to be uploaded
   * @param swiftDir directory swift to archive
   * @return boolean representation, success (true) or failure (false) to archive
   */
This function tries upload a task folder file to Swift.
@param actualFile file to be uploaded
@param swiftDir directory swift to archive
@return boolean representation, success (true) or failure (false) to archive
This function tries upload a task folder file to Swift . @param actualFile file to be uploaded @param swiftDir directory swift to archive @return boolean representation success ( true ) or failure ( false ) to archive
private boolean uploadFile(File actualFile, String swiftDir) {
    LOGGER.info(
        "Trying to archive file ["
            + actualFile.getAbsolutePath()
            + "] for swift container ["
            + containerName
            + "] with a maximum of "
            + MAX_SWIFT_UPLOAD_TRIES
            + " uploading attempts");
    for (int itry = 0; itry < MAX_SWIFT_UPLOAD_TRIES; itry++) {
      try {
        swiftAPIClient.uploadFile(containerName, actualFile, swiftDir);
        return true;
      } catch (Exception e) {
        LOGGER.error("Error while uploading file " + actualFile.getAbsolutePath() + " to swift", e);
      }
    }
    return false;
  }
private boolean uploadFile ( File actualFile , String swiftDir ) { LOGGER . info ( "Trying to archive file [" + actualFile . getAbsolutePath ( ) + "] for swift container [" + containerName + "] with a maximum of " + MAX_SWIFT_UPLOAD_TRIES + " uploading attempts" ) ; for ( int itry = 0 ; itry < MAX_SWIFT_UPLOAD_TRIES ; itry ++ ) { try { swiftAPIClient . uploadFile ( containerName , actualFile , swiftDir ) ; return true ; } catch ( Exception e ) { LOGGER . error ( "Error while uploading file " + actualFile . getAbsolutePath ( ) + " to swift" , e ) ; } } return false ; }
This function tries upload a task folder file to Swift.
This function tries upload a task folder file to Swift .