public void complete(T value) {
        try {
            if (value instanceof RuntimeException)
                throw new IllegalArgumentException("The argument to complete can not be an instance of RuntimeException");

            if (!result.compareAndSet(INCOMPLETE_SENTINEL, value))
                throw new IllegalStateException("Invalid attempt to complete a request future which is already complete");
            fireSuccess();
        } finally {
            completedLatch.countDown();
        }
    }
Complete the request successfully. After this call, {@link #succeeded()} will return true
and the value can be obtained through {@link #value()}.
@param value corresponding value (or null if there is none)
@throws IllegalStateException if the future has already been completed
@throws IllegalArgumentException if the argument is an instance of {@link RuntimeException}
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestFuture.java