public class SegmentRoundingPolicy extends Object implements RoundingPolicy
| Modifier and Type | Field and Description |
|---|---|
static long |
MIN_SEGMENT_SIZE
The minimal segment size.
|
| Constructor and Description |
|---|
SegmentRoundingPolicy(int segmentSize)
Constructor for the segment rounding policy.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getRoundedSize(long requestSize) |
int |
getSegmentSize() |
public static final long MIN_SEGMENT_SIZE
public SegmentRoundingPolicy(int segmentSize)
segmentSize - the segment size.IllegalArgumentException - if the segment size is smaller than
MIN_SEGMENT_SIZE, or is not a power of 2.public long getRoundedSize(long requestSize)
getRoundedSize in interface RoundingPolicypublic int getSegmentSize()
Copyright © 2024 The Apache Software Foundation. All rights reserved.