private void handleArchive ( BlobId blobId ) { String destinationPath = getDestinationPath ( blobId , gcsOriginErrorConfig . errorPrefix ) ; switch ( gcsOriginErrorConfig . archivingOption ) { case COPY_TO_BUCKET : copy ( blobId , gcsOriginErrorConfig . errorBucket , destinationPath , false ) ; break ; case MOVE_TO_BUCKET : copy ( blobId , gcsOriginErrorConfig . errorBucket , destinationPath , true ) ; break ; case COPY_TO_PREFIX : copy ( blobId , blobId . getBucket ( ) , destinationPath , false ) ; break ; case MOVE_TO_PREFIX : copy ( blobId , blobId . getBucket ( ) , destinationPath , true ) ; break ; } }
Archive the blob