@Override
    public final void close() {
        if (teardown != null) {
            teardown.accept(success, duration.complete());
            teardown = null;
        }
        release();
    }
CloseableInvoker is an abstract implementation of {@link Closeable} with an additional hook for
executing code at closing. Classes that extend CloseableInvoker need to override {@link #release()}
instead of {@link #close()} which is final to avoid accidental overriding.

@author ollivir
container-search/src/main/java/com/yahoo/search/dispatch/CloseableInvoker.java