class Canceller implements BiConsumer<Object, Throwable> {
        final Future<?> future;

        Canceller(Future<?> future) {
            this.future = future;
        }

        public void accept(Object ignore, Throwable ex) {<FILL_FUNCTION_BODY>}
    }

            if (null == ex && null != future && !future.isDone()) {
                future.cancel(false);
            }
        
<no_super_class>