private boolean claimStream() {
    lastReserveAttemptTimeMillis = System.currentTimeMillis();
    for (int attempt = 0; attempt < 5; ++attempt) {

      if (state != RecordState.OPEN) {
        log.warn("claimStream fail because state is closed. ");
        return false;
      }

      int currentlyAvailable = numOfAvailableStreams.get();

      if (currentlyAvailable <= 0) {
        log.warn("claimStream fail because currentlyAvailable: {}. ", currentlyAvailable);
        return false;
      }
      if (numOfAvailableStreams.compareAndSet(currentlyAvailable, currentlyAvailable - 1)) {
        return true;
      }
    }
    log.warn("claimStream fail because attempt failed. ");

    return false;
  }
Delivers the exception to all registered child channels, and prohibits new streams being created on this connection.
ambry-network/src/main/java/com/github/ambry/network/http2/MultiplexedChannelRecord.java