Class MemoryPressureController.JvmMemoryPressureController
java.lang.Object
io.fluxzero.common.caching.MemoryPressureController.JvmMemoryPressureController
- All Implemented Interfaces:
MemoryPressureController
- Enclosing interface:
MemoryPressureController
public static class MemoryPressureController.JvmMemoryPressureController
extends Object
implements MemoryPressureController
-
Nested Class Summary
Nested classes/interfaces inherited from interface MemoryPressureController
MemoryPressureController.JvmMemoryPressureController -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final longstatic final int -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanshouldEvict(long currentWeight, long maxWeight) int
-
Field Details
-
DEFAULT_HEAP_USAGE_THRESHOLD_PERCENT
public static final int DEFAULT_HEAP_USAGE_THRESHOLD_PERCENT- See Also:
-
DEFAULT_GC_TIME_THRESHOLD_PERCENT
public static final int DEFAULT_GC_TIME_THRESHOLD_PERCENT- See Also:
-
DEFAULT_TRIM_RATIO_PERCENT
public static final int DEFAULT_TRIM_RATIO_PERCENT- See Also:
-
DEFAULT_MAX_TRIM_WEIGHT
public static final long DEFAULT_MAX_TRIM_WEIGHT- See Also:
-
-
Method Details
-
shouldEvict
public boolean shouldEvict(long currentWeight, long maxWeight) - Specified by:
shouldEvictin interfaceMemoryPressureController
-
trimRatioPercent
public int trimRatioPercent()- Specified by:
trimRatioPercentin interfaceMemoryPressureController
-
maxTrimWeight
public long maxTrimWeight()- Specified by:
maxTrimWeightin interfaceMemoryPressureController
-