Package com.barden.library.cache
Class CachedEntity
java.lang.Object
com.barden.library.cache.CachedEntity
Cached entity abstract class.
-
Constructor Summary
ConstructorsConstructorDescriptionCachedEntity(long time, TimeUnit unit, Consumer<Task> action) Creates cached entity object. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanGets if cache time expired or not.protected voidResets cache time.
-
Constructor Details
-
CachedEntity
Creates cached entity object.- Parameters:
time- Time.unit- Time unit.action- Task consumer.
-
-
Method Details
-
resetCacheTime
protected void resetCacheTime()Resets cache time. -
isCacheTimeExpired
protected boolean isCacheTimeExpired()Gets if cache time expired or not.- Returns:
- If cache time expired or not.
-