Send feedback
Class FlushPolicy.MinFlushSizeFlushPolicy (2.58.1)
Stay organized with collections
Save and categorize content based on your preferences.
Beta
This library is covered by the Pre-GA Offerings Terms
of the Terms of Service. Pre-GA libraries might have limited support,
and changes to pre-GA libraries might not be compatible with other pre-GA versions.
For more information, see the
launch stage descriptions .
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.
Methods
equals(Object o)
public boolean equals ( Object o )
Parameter
Name
Description
o
Object
Overrides
getMaxPendingBytes()
public long getMaxPendingBytes ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
Returns
Type
Description
long
getMinFlushSize()
public int getMinFlushSize ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
The minimum number of bytes to include in each automatic flush
Default: 4194304 (4 MiB)
See Also: #withMinFlushSize(int)
Returns
Type
Description
int
hashCode()
Returns
Type
Description
int
Overrides
toString()
Returns
Type
Description
String
Overrides
withMaxPendingBytes(long maxPendingBytes)
public FlushPolicy . MinFlushSizeFlushPolicy withMaxPendingBytes ( long maxPendingBytes )
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
Parameter
Name
Description
maxPendingBytes
long
withMinFlushSize(int minFlushSize)
public FlushPolicy . MinFlushSizeFlushPolicy withMinFlushSize ( int minFlushSize )
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
Return an instance with the minFlushSize
set to the specified value.
Default: 4194304 (4 MiB)
See Also: #getMinFlushSize()
Parameter
Name
Description
minFlushSize
int
The number of bytes to buffer before flushing.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-11 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-11 UTC."],[],[]]