class KeyCallable<V> implements Callable<V> {
    private final String key;

    private volatile boolean cancelled = false;

    public KeyCallable(String key) {
        this.key = key;
    }

    public abstract V execute();

    @Override
    public V call() throws Exception {<FILL_FUNCTION_BODY>}

    public void cancel() {
        this.cancelled = true;
    }

    public String getKey() {
        return key;
    }

    public boolean isCancelled() {
        return cancelled;
    }
}

        if (!cancelled) {
            V v =  execute();
            return v;
        }
        return null;
    
<no_super_class>