Package com.google.cloud.storage
Class FlushPolicy.MinFlushSizeFlushPolicy
java.lang.Object
com.google.cloud.storage.FlushPolicy
com.google.cloud.storage.FlushPolicy.MinFlushSizeFlushPolicy
- Enclosing class:
- FlushPolicy
@Immutable
@BetaApi
public static final class FlushPolicy.MinFlushSizeFlushPolicy
extends FlushPolicy
Define a
FlushPolicy where a min number of bytes will be required before a flush GCS
happens.
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.
Instances of this class are immutable and thread safe.
- Since:
- 2.51.0 This new api is in preview and is subject to breaking changes.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.cloud.storage.FlushPolicy
FlushPolicy.MaxFlushSizeFlushPolicy, FlushPolicy.MinFlushSizeFlushPolicy -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongintThe minimum number of bytes to include in each automatic flushinthashCode()toString()withMaxPendingBytes(long maxPendingBytes) withMinFlushSize(int minFlushSize) Return an instance with theminFlushSizeset to the specified value.Methods inherited from class com.google.cloud.storage.FlushPolicy
maxFlushSize, maxFlushSize, minFlushSize, minFlushSize
-
Method Details
-
getMinFlushSize
@BetaApi public int getMinFlushSize()The minimum number of bytes to include in each automatic flushDefault:
4194304 (4 MiB)- See Also:
-
withMinFlushSize
Return an instance with theminFlushSizeset to the specified value.Default:
4194304 (4 MiB)- Parameters:
minFlushSize- The number of bytes to buffer before flushing.- Returns:
- The new instance
- See Also:
-
getMaxPendingBytes
@BetaApi public long getMaxPendingBytes() -
withMaxPendingBytes
-
equals
- Specified by:
equalsin classFlushPolicy
-
hashCode
public int hashCode()- Specified by:
hashCodein classFlushPolicy
-
toString
- Specified by:
toStringin classFlushPolicy
-