@SuppressWarnings("unchecked")
        @Override
        public <R> QueryResult<R> query(final Query<R> query, final PositionBound positionBound, final QueryConfig config) {

            final long start = time.nanoseconds();
            final QueryResult<R> result;

            final QueryHandler handler = queryHandlers.get(query.getClass());
            if (handler == null) {
                result = wrapped().query(query, positionBound, config);
                if (config.isCollectExecutionInfo()) {
                    result.addExecutionInfo(
                        "Handled in " + getClass() + " in " + (time.nanoseconds() - start) + "ns");
                }
            } else {
                result = (QueryResult<R>) handler.apply(
                    query,
                    positionBound,
                    config,
                    this
                );
                if (config.isCollectExecutionInfo()) {
                    result.addExecutionInfo(
                        "Handled in " + getClass() + " with serdes "
                            + serdes + " in " + (time.nanoseconds() - start) + "ns");
                }
            }
            return result;
        }
Conceptually, {@link MeteredVersionedKeyValueStore} should {@code extend}
{@link MeteredKeyValueStore}, but due to type conflicts, we cannot do this. (Specifically,
the first needs to be {@link VersionedKeyValueStore} while the second is {@link KeyValueStore}
and the two interfaces conflict.) Thus, we use an internal <it>instance</it> of
{@code MeteredKeyValueStore} to mimic inheritance instead.
<p>
It's not ideal because it requires an extra step to translate between the APIs of
{@link VersionedKeyValueStore} in {@link MeteredVersionedKeyValueStore} and
the APIs of {@link TimestampedKeyValueStore} in {@link MeteredVersionedKeyValueStoreInternal}.
This extra step is all that the methods of {@code MeteredVersionedKeyValueStoreInternal} do.
<p>
Note that the addition of {@link #get(Object, long)} and {@link #delete(Object, long)} in
this class are to match the interface of {@link VersionedKeyValueStore}.
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredVersionedKeyValueStore.java