public State currentState() {
        return lastState.get().state;
    }
Get the current state.

@return the current state; may be null if no state change has been recorded
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/StateTracker.java