Class MetadataCachedEntity

java.lang.Object
com.barden.library.metadata.MetadataEntity
com.barden.library.cache.MetadataCachedEntity

public abstract class MetadataCachedEntity extends MetadataEntity
Cached entity abstract class.
  • Constructor Details

    • MetadataCachedEntity

      public MetadataCachedEntity(long time, @Nonnull TimeUnit unit, @Nonnull Consumer<Task> action)
      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.