public ClassLoader loader() {
        return loader;
    }
Handles processing for an individual task. This interface only provides the basic methods
used by {@link Worker} to manage the tasks. Implementations combine a user-specified Task with
Kafka to create a data flow.
<p>
Note on locking: since the task runs in its own thread, special care must be taken to ensure
that state transitions are reported correctly, in particular since some state transitions are
asynchronous (e.g. pause/resume). For example, changing the state to paused could cause a race
if the task fails at the same time. To protect from these cases, we synchronize status updates
using the WorkerTask's monitor.
@param <T> The type of record initially entering the processing pipeline from the source or consumer
@param <R> The type of record during transformations (must be an implementation of {@link ConnectRecord})
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java