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 |
|---|---|
int |
getRoundedSize(int 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 int getRoundedSize(int requestSize)
getRoundedSize in interface RoundingPolicypublic int getSegmentSize()
Copyright © 2019 The Apache Software Foundation. All rights reserved.