protected void setAutoRead(boolean autoRead) {
    channel.config().setAutoRead(autoRead);
    channel.config().setRecvByteBufAllocator(autoRead ? savedAllocator : recvByteBufAllocator);
    logger.trace("Setting auto-read to {} on channel {}", channel.config().isAutoRead(), channel);
  }
Switches auto reading from the channel on and off.
@param autoRead {@code true} if auto read has to be switched on. {@code false} otherwise.
ambry-rest/src/main/java/com/github/ambry/rest/NettyRequest.java