public void reset() {
        for (;;) {
            final boolean marked = cancellableRef.isMarked();
            final Cancellable actualCancellable = cancellableRef.getReference();
            if (actualCancellable != null) {
                actualCancellable.cancel();
            }
            if (cancellableRef.compareAndSet(actualCancellable, null, marked, false)) {
                break;
            }
        }
    }
Resets internal state of the request making it reusable.

@since 4.2
httpclient5/src/main/java/org/apache/hc/client5/http/classic/methods/HttpUriRequestBase.java