@Override
  void poll(RequestRegistrationCallback<GetOperation> requestRegistrationCallback) {
    if (isOperationComplete()) {
      return;
    }
    if (operationException.get() == null) {
      if (firstChunk.isReady() || firstChunk.isInProgress()) {
        firstChunk.poll(requestRegistrationCallback);
      }
      if (firstChunk.isComplete()) {
        onChunkOperationComplete(firstChunk);
        // Although an attempt is made to write to the channel as soon as a chunk is successfully retrieved,
        // the caller might not have called readInto() and passed in a channel at the time. So an attempt is always
        // made from within poll.
        if (blobDataChannel != null) {
          blobDataChannel.maybeWriteToChannel();
        }
        // If this is a composite blob, poll for requests for subsequent chunks.
        if (dataChunks != null) {
          for (GetChunk dataChunk : dataChunks) {
            if (dataChunk.isFree() && chunkIdIterator.hasNext()) {
              dataChunk.initialize(chunkIdIterator.nextIndex(), chunkIdIterator.next());
            }
            if (dataChunk.isInProgress() || (dataChunk.isReady()
                && numChunksRetrieved.get() - blobDataChannel.getNumChunksWrittenOut()
                < routerConfig.routerMaxInMemGetChunks)) {
              dataChunk.poll(requestRegistrationCallback);
              if (dataChunk.isComplete()) {
                onChunkOperationComplete(dataChunk);
                if (isOperationComplete()) {
                  break;
                }
              }
            }
          }
        }
      }
    }
    if (operationException.get() != null) {
      abort(operationException.get());
    }
  }
As part of the poll, GetBlobOperation fetches new requests to be issued and updates the state based on
whether previously issued requests have timed out and so on. Additionally, any writes of previously retrieved
chunk buffers into the {@link AsyncWritableChannel} passed in by the caller also happens within this method.
@param requestRegistrationCallback the {@link RequestRegistrationCallback} to call for every request that gets
                                   created as part of this poll operation.
ambry-router/src/main/java/com/github/ambry/router/GetBlobOperation.java