Class CacheEntry

java.lang.Object
jadex.collection.CacheEntry

public class CacheEntry extends Object
Entry for cache.
  • Field Details

    • data

      protected Object data
      The cache data.
    • cachedate

      protected long cachedate
      The cache data.
    • ttl

      protected long ttl
      The time to live.
  • Constructor Details

    • CacheEntry

      public CacheEntry(Object data, long cachedate, long ttl)
      Create a new cache entry.
  • Method Details

    • getData

      public Object getData()
      Get the data.
      Returns:
      the data.
    • getCacheDate

      public long getCacheDate()
      Get the cachedate.
      Returns:
      the cachedate.
    • getTimeToLive

      public long getTimeToLive()
      Get the ttl.
      Returns:
      the ttl.
    • isExpired

      public boolean isExpired(long now)
      Test if a cache entry is expired.
      Parameters:
      now - The current time (-1 for never expire).
      Returns:
      True, if it is expired.