Interface MemoryPressureController
- All Known Implementing Classes:
MemoryPressureController.JvmMemoryPressureController
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Determines whether caches should proactively shed entries.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringGC-time percentage over the sampling window that triggers JVM-wide memory-aware cache trimming.static final StringHeap usage percentage that triggers JVM-wide memory-aware cache trimming.static final StringMaximum cache weight to evict per observed memory-pressure pass.static final StringPercentage of the registered memory-aware cache weight to evict per observed memory-pressure pass.static final MemoryPressureController -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryPressureControllerjvm()static MemoryPressureControllerjvm(PropertySource propertySource) default longstatic MemoryPressureControllernone()booleanshouldEvict(long currentWeight, long maxWeight) default int
-
Field Details
-
MEMORY_PRESSURE_HEAP_THRESHOLD_PERCENT_PROPERTY
Heap usage percentage that triggers JVM-wide memory-aware cache trimming. Defaults to85.- See Also:
-
MEMORY_PRESSURE_GC_TIME_THRESHOLD_PERCENT_PROPERTY
GC-time percentage over the sampling window that triggers JVM-wide memory-aware cache trimming. Defaults to20.- See Also:
-
MEMORY_PRESSURE_TRIM_RATIO_PERCENT_PROPERTY
Percentage of the registered memory-aware cache weight to evict per observed memory-pressure pass. Defaults to20.- See Also:
-
MEMORY_PRESSURE_MAX_TRIM_WEIGHT_PROPERTY
Maximum cache weight to evict per observed memory-pressure pass. For byte-weighted caches this is bytes; for count-weighted caches this is entries. Defaults to1 GiB.- See Also:
-
NONE
-
-
Method Details
-
shouldEvict
boolean shouldEvict(long currentWeight, long maxWeight) -
trimRatioPercent
default int trimRatioPercent() -
maxTrimWeight
default long maxTrimWeight() -
none
-
jvm
-
jvm
-