protected void checkAscpThreshold ( ) { if ( TransferListener . getAscpCount ( ) >= asperaTransferManagerConfig . getAscpMaxConcurrent ( ) ) { log . error ( "ASCP process threshold has been reached, there are currently " + TransferListener . getAscpCount ( ) + " processes running" ) ; throw new AsperaTransferException ( "ASCP process threshold has been reached" ) ; } }
Check if ascp count has hit limit If it has throw an exception