Class CachedEntity

java.lang.Object
com.barden.library.cache.CachedEntity

public abstract class CachedEntity extends Object
Cached entity abstract class.
  • Constructor Details

    • CachedEntity

      public CachedEntity(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.