code: protected void doFinalApply(IPolicyContext context, TransferQuotaConfig config, long downloadedBytes) {
          if (config.getDirection() == TransferDirectionType.download || config.getDirection() == TransferDirectionType.both) {
              final String bucketId = context.getAttribute(BUCKET_ID_ATTR, (String) null);
              final RateBucketPeriod period = context.getAttribute(PERIOD_ATTR, (RateBucketPeriod) null);
  
              IRateLimiterComponent rateLimiter = context.getComponent(IRateLimiterComponent.class);
              rateLimiter.accept(bucketId, period, config.getLimit(), downloadedBytes, new IAsyncResultHandler<RateLimitResponse>() {
                  @Override
                  public void handle(IAsyncResult<RateLimitResponse> result) {
                      // No need to handle the response - it's too late to do anything meaningful with the result.
                      // TODO log any error that might have ocurred
                  }
              });
          }
      }
docs: Called when everything is done (the last byte is written).  This is used to
  record the # of bytes downloaded.
  @param context
  @param config
  @param downloadedBytes