Module methanol

Class CacheWritingPublisher

java.lang.Object
com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher
All Implemented Interfaces:
Flow.Publisher<List<ByteBuffer>>

public final class CacheWritingPublisher extends Object implements Flow.Publisher<List<ByteBuffer>>
A Publisher that writes the body stream into cache while simultaneously forwarding it to downstream. Forwarding data downstream and writing it run at different paces. Consequently, writing may lag behind downstream consumption, and may, by default, proceed in background after downstream has been completed. If the com.github.mizosoft.methanol.internal.cache.CacheWritingPublisher.waitForCommit is true, downstream isn't completed unless all data is written and the edit is committed. If an error occurs while writing, the edit is silently discarded.