public long put(final K key, final V value, final long timestamp) {
        if (timestampedStore != null) {
            timestampedStore.put(key, ValueAndTimestamp.make(value, timestamp));
            return PUT_RETURN_CODE_IS_LATEST;
        }
        if (versionedStore != null) {
            return versionedStore.put(key, value, timestamp);
        }
        throw new IllegalStateException("KeyValueStoreWrapper must be initialized with either timestamped or versioned store");
    }
@return {@code -1} if the put record is the latest for its key, and {@code Long.MIN_VALUE}
        if the put was rejected (i.e., due to grace period having elapsed for a versioned
        store). If neither, any other long value may be returned.
streams/src/main/java/org/apache/kafka/streams/state/internals/KeyValueStoreWrapper.java