public FASPConnectionInfo getFaspConnectionInfo ( String bucketName ) { log . trace ( "AsperaTransferManager.getFaspConnectionInfo >> start " + System . nanoTime ( ) ) ; FASPConnectionInfo faspConnectionInfo = akCache . get ( bucketName ) ; if ( null == faspConnectionInfo ) { log . trace ( "AsperaTransferManager.getFaspConnectionInfo >> retrieve from COS " + System . nanoTime ( ) ) ; faspConnectionInfo = s3Client . getBucketFaspConnectionInfo ( bucketName ) ; log . trace ( "AsperaTransferManager.getFaspConnectionInfo << retrieve from COS " + System . nanoTime ( ) ) ; if ( null == faspConnectionInfo ) { throw new SdkClientException ( "Failed to retrieve faspConnectionInfo for bucket: " + bucketName ) ; } akCache . put ( bucketName , faspConnectionInfo ) ; } log . trace ( "AsperaTransferManager.getFaspConnectionInfo << end " + System . nanoTime ( ) ) ; return faspConnectionInfo ; }
Check the LRU cache to see if the Aspera Key has already been retrieved for this bucket . If it has return it else call onto the s3Client to get the FASPConnectionInfo for the bucket name