public Optional<Long> claimNextId() {
        long nextId = producerIdCounter.getAndIncrement();
        if (nextId > lastProducerId()) {
            return Optional.empty();
        }
        return Optional.of(nextId);
    }
Claim the next available producer id from the block.
Returns an empty result if there are no more available producer ids in the block.
server-common/src/main/java/org/apache/kafka/server/common/ProducerIdsBlock.java