Package one.microstream.reference
Interface Lazy.Checker
- All Known Implementing Classes:
 Lazy.Checker.Default,LazyReferenceManager.Clearer
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
@FunctionalInterface public static interface Lazy.Checker
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLazy.Checker.DefaultThis implementation uses two dimensions to evaluate if a lazy reference will be cleared:
- time: a ref's "age" in terms ofLazy.lastTouched()compared toSystem.currentTimeMillis()
- memory: the amount of used memory compared to the permitted quota of total available memory.static interfaceLazy.Checker.Defaults - 
Method Summary
Modifier and Type Method Description default voidbeginCheckCycle()booleancheck(Lazy<?> lazyReference)default voidendCheckCycle()static booleanisValidMemoryQuota(double memoryQuota)static booleanisValidTimeout(long millisecondTimeout)static doublevalidateMemoryQuota(double memoryQuota)static longvalidateTimeout(long millisecondTimeout) 
- 
Method Details
- 
beginCheckCycle
default void beginCheckCycle() - 
check
- Parameters:
 lazyReference- the lazy reference to check against- Returns:
 - if additional checks should be prevented
 
 - 
endCheckCycle
default void endCheckCycle() - 
isValidTimeout
static boolean isValidTimeout(long millisecondTimeout) - 
isValidMemoryQuota
static boolean isValidMemoryQuota(double memoryQuota) - 
validateTimeout
static long validateTimeout(long millisecondTimeout) - 
validateMemoryQuota
static double validateMemoryQuota(double memoryQuota) 
 -