Package io.higson.runtime.evict
Class DefaultIdleChecker
java.lang.Object
io.higson.runtime.evict.DefaultIdleChecker
- All Implemented Interfaces:
IdleChecker
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultIdleChecker(long maxIdleMillis) DefaultIdleChecker(long maxIdleMillis, Clock clock) DefaultIdleChecker(Duration duration) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time from the underlying clock.booleanDecides whether max idle time was exceeded for a provided cached parameter.toString()
-
Constructor Details
-
DefaultIdleChecker
-
DefaultIdleChecker
public DefaultIdleChecker(long maxIdleMillis) -
DefaultIdleChecker
-
-
Method Details
-
clockTime
public long clockTime()Description copied from interface:IdleCheckerReturns the time from the underlying clock. This time will be used to update the parameter's last access time.- Specified by:
clockTimein interfaceIdleChecker
-
idleTimeExceeded
Description copied from interface:IdleCheckerDecides whether max idle time was exceeded for a provided cached parameter.- Specified by:
idleTimeExceededin interfaceIdleChecker
-
getIdleTimeout
-
toString
-