@Override
        public WriteBufferSegmentWithDbFallback getOrCreateSegmentIfLive(final long segmentId, final ProcessorContext context, final long streamTime) {
            if (segmentsWriteBuffer.containsKey(segmentId)) {
                return segmentsWriteBuffer.get(segmentId);
            }

            final LogicalKeyValueSegment dbSegment = dbClient.getOrCreateSegmentIfLive(segmentId, context, streamTime);
            if (dbSegment == null) {
                // segment is not live
                return null;
            }
            // creating a new segment automatically registers it with the segments store
            return new WriteBufferSegmentWithDbFallback(dbSegment);
        }
Client for writing to (and reading from) the write buffer as part of restore.
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBVersionedStoreRestoreWriteBuffer.java