@FunctionalInterface public static interface Lazy.Checker
| Modifier and Type | Interface and Description |
|---|---|
static class |
Lazy.Checker.Default
This implementation uses two dimensions to evaluate if a lazy reference will be cleared:
- time: a ref's "age" in terms of Lazy.lastTouched() compared to System.currentTimeMillis()- memory: the amount of used memory compared to the permitted quota of total available memory. |
static interface |
Lazy.Checker.Defaults |
| Modifier and Type | Method and Description |
|---|---|
default void |
beginCheckCycle() |
boolean |
check(Lazy<?> lazyReference) |
default void |
endCheckCycle() |
static boolean |
isValidMemoryQuota(double memoryQuota) |
static boolean |
isValidTimeout(long millisecondTimeout) |
static double |
validateMemoryQuota(double memoryQuota) |
static long |
validateTimeout(long millisecondTimeout) |
default void beginCheckCycle()
boolean check(Lazy<?> lazyReference)
lazyReference - the lazy reference to check againstdefault void endCheckCycle()
static boolean isValidTimeout(long millisecondTimeout)
static boolean isValidMemoryQuota(double memoryQuota)
static long validateTimeout(long millisecondTimeout)
static double validateMemoryQuota(double memoryQuota)
Copyright © 2022 MicroStream Software. All rights reserved.