Class FlushPolicy.MaxFlushSizeFlushPolicy

java.lang.Object
com.google.cloud.storage.FlushPolicy
com.google.cloud.storage.FlushPolicy.MaxFlushSizeFlushPolicy
Enclosing class:
FlushPolicy

@Immutable @BetaApi public static final class FlushPolicy.MaxFlushSizeFlushPolicy extends FlushPolicy
Define a FlushPolicy where a max number of bytes will be flushed to GCS per flush.

If there are not enough bytes to trigger a flush, they will be held in memory until there are enough bytes, or an explicit flush is performed by closing the channel. If more bytes are provided than the configured maxFlushSize, multiple flushes will be performed.

Instances of this class are immutable and thread safe.

Instead of this, strategy use FlushPolicy.minFlushSize().withMaxPendingBytes(long)

Since:
2.51.0 This new api is in preview and is subject to breaking changes.