public static long calculateOptimalPartSizeForCopy ( CopyObjectRequest copyObjectRequest , TransferManagerConfiguration configuration , long contentLengthOfSource ) { double optimalPartSize = ( double ) contentLengthOfSource / ( double ) MAXIMUM_UPLOAD_PARTS ; // round up so we don't push the copy over the maximum number of parts optimalPartSize = Math . ceil ( optimalPartSize ) ; return ( long ) Math . max ( optimalPartSize , configuration . getMultipartCopyPartSize ( ) ) ; }
Calculates the optimal part size of each part request if the copy operation is carried out as multi - part copy .