public Serde keySerde() {
        return oldProcessorContext != null ? oldProcessorContext.keySerde() :
            newProcessorContext != null ? newProcessorContext.keySerde() : stateStorecontext.keySerde();
    }
Allows serde access across different context types.
streams/src/main/java/org/apache/kafka/streams/processor/internals/SerdeGetter.java