public class MemoryManager extends Object
This class balances the allocation size of each writer by resize them averagely. When the sum of each writer's allocation size is less than total memory pool, keep their original value. When the sum exceeds, decrease each writer's allocation size by a ratio.
| Constructor and Description |
|---|
MemoryManager(float ratio,
long minAllocation) |
| Modifier and Type | Method and Description |
|---|---|
void |
registerScaleCallBack(String callBackName,
Runnable callBack)
Register callback and deduplicate it if any.
|
Copyright © 2023 The Apache Software Foundation. All rights reserved.