private void invokeCallback(long bytesRead, Exception exception) {
    if (callbackInvoked.compareAndSet(false, true)) {
      futureResult.done(bytesRead, exception);
      if (readIntoCallback != null) {
        readIntoCallback.onCompletion(bytesRead, exception);
      }
    }
  }
Invokes the callback and updates the future once this is called. This function ensures that the callback is invoked
just once.
@param bytesRead the number of bytes read.
@param exception the {@link Exception}, if any, to pass to the callback.
ambry-tools/src/main/java/com/github/ambry/tools/perf/rest/PerfRSC.java