Is there JDK interface which looks like interface ConsumerInterface<T> { void consume(T data); }
<p>There's <code>Callable&lt;V&gt;</code> in JDK which is producer interface, is there consumer interface in JDK?  </p>

<p>Question rationale: I'm writing executor which accepts 2-phase tasks: 1st phase is producing data, 2nd phase is consuming of that data. In between these 2 phases I could like to cancel task (i.e., to not performing consumption).</p>

<p><strong>UPDATE</strong>: Well, I thought such general-purpose interface (e.g., useful in multi-threaded programming) could be in JDK. I just can't remember if I actually seen such interface in JDK.</p>
