Module org.apache.arrow.memory.core
Package org.apache.arrow.memory.rounding
Class SegmentRoundingPolicy
java.lang.Object
org.apache.arrow.memory.rounding.SegmentRoundingPolicy
- All Implemented Interfaces:
RoundingPolicy
The rounding policy that each buffer size must a multiple of the segment size.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSegmentRoundingPolicy
(int segmentSize) Deprecated, for removal: This API element is subject to removal in a future version.SegmentRoundingPolicy
(long segmentSize) Constructor for the segment rounding policy. -
Method Summary
Modifier and TypeMethodDescriptionlong
getRoundedSize
(long requestSize) int
Deprecated, for removal: This API element is subject to removal in a future version.long
-
Field Details
-
MIN_SEGMENT_SIZE
public static final long MIN_SEGMENT_SIZEThe minimal segment size.- See Also:
-
-
Constructor Details
-
SegmentRoundingPolicy
@Deprecated(forRemoval=true) @InlineMe(replacement="this((long) segmentSize)") public SegmentRoundingPolicy(int segmentSize) Deprecated, for removal: This API element is subject to removal in a future version.useSegmentRoundingPolicy(long)
instead.Constructor for the segment rounding policy.- Parameters:
segmentSize
- the segment size.- Throws:
IllegalArgumentException
- if the segment size is smaller thanMIN_SEGMENT_SIZE
, or is not a power of 2.
-
SegmentRoundingPolicy
public SegmentRoundingPolicy(long segmentSize) Constructor for the segment rounding policy.- Parameters:
segmentSize
- the segment size.- Throws:
IllegalArgumentException
- if the segment size is smaller thanMIN_SEGMENT_SIZE
, or is not a power of 2.
-
-
Method Details
-
getRoundedSize
public long getRoundedSize(long requestSize) - Specified by:
getRoundedSize
in interfaceRoundingPolicy
-
getSegmentSize
Deprecated, for removal: This API element is subject to removal in a future version. -
getSegmentSizeAsLong
public long getSegmentSizeAsLong()
-
SegmentRoundingPolicy(long)
instead.