public State state() {
        return state;
    }
Return the current {@link State} of this {@code KafkaStreams} instance.

@return the current state of this Kafka Streams instance
streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java