@Override
    public void flush() {
        segmentStores.flush();
        // flushing segments store includes flushing latest value store, since they share the
        // same physical RocksDB instance
    }
A persistent, versioned key-value store based on RocksDB.
<p>
This store implementation consists of a "latest value store" and "segment stores." The latest
record version for each key is stored in the latest value store, while older record versions
are stored in the segment stores. Conceptually, each record version has two associated
timestamps:
<ul>
    <li>a {@code validFrom} timestamp. This timestamp is explicitly associated with the record
    as part of the {@link VersionedKeyValueStore#put(Object, Object, long)}} call to the store;
    i.e., this is the record's timestamp.</li>
    <li>a {@code validTo} timestamp. This is the timestamp of the next record (or deletion)
    associated with the same key, and is implicitly associated with the record. This timestamp
    can change as new records are inserted into the store.</li>
</ul>
The validity interval of a record is from validFrom (inclusive) to validTo (exclusive), and
can change as new record versions are inserted into the store (and validTo changes as a result).
<p>
Old record versions are stored in segment stores according to their validTo timestamps. This
allows for efficient expiry of old record versions, as entire segments can be dropped from the
store at a time, once the records contained in the segment are no longer relevant based on the
store's history retention (for an explanation of "history retention", see
{@link VersionedKeyValueStore}). Multiple record versions (for the same key) within a single
segment are stored together using the format specified in {@link RocksDBVersionedStoreSegmentValueFormatter}.
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBVersionedStore.java