Package com.barden.library.cache
Class MetadataCachedEntity
java.lang.Object
com.barden.library.metadata.MetadataEntity
com.barden.library.cache.MetadataCachedEntity
Cached entity abstract class.
-
Field Summary
Fields inherited from class com.barden.library.metadata.MetadataEntity
metadata -
Constructor Summary
ConstructorsConstructorDescriptionMetadataCachedEntity(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.Methods inherited from class com.barden.library.metadata.MetadataEntity
metadata
-
Constructor Details
-
MetadataCachedEntity
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.
-