@SuppressWarnings("unchecked")
    @Override
    protected Serde<ValueAndTimestamp<V>> prepareValueSerde(final Serde<ValueAndTimestamp<V>> valueSerde, final SerdeGetter getter) {
        if (valueSerde == null) {
            return new ValueAndTimestampSerde<>((Serde<V>) getter.valueSerde());
        } else {
            return super.prepareValueSerde(valueSerde, getter);
        }
    }
A Metered {@link TimestampedWindowStore} wrapper that is used for recording operation metrics, and hence its
inner WindowStore implementation do not need to provide its own metrics collecting functionality.
The inner {@link WindowStore} of this class is of type &lt;Bytes,byte[]&gt;, hence we use {@link Serde}s
to convert from &lt;K,ValueAndTimestamp&lt;V&gt&gt; to &lt;Bytes,byte[]&gt;

@param <K>
@param <V>
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredTimestampedWindowStore.java