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 SummaryNested 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 SummaryModifier 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- 
beginCheckCycledefault void beginCheckCycle()
- 
check- Parameters:
- lazyReference- the lazy reference to check against
- Returns:
- if additional checks should be prevented
 
- 
endCheckCycledefault void endCheckCycle()
- 
isValidTimeoutstatic boolean isValidTimeout(long millisecondTimeout)
- 
isValidMemoryQuotastatic boolean isValidMemoryQuota(double memoryQuota)
- 
validateTimeoutstatic long validateTimeout(long millisecondTimeout)
- 
validateMemoryQuotastatic double validateMemoryQuota(double memoryQuota)
 
-