Package jadex.collection
Class CacheEntry
java.lang.Object
jadex.collection.CacheEntry
Entry for cache.
-
Field Details
-
data
The cache data. -
cachedate
protected long cachedateThe cache data. -
ttl
protected long ttlThe time to live.
-
-
Constructor Details
-
CacheEntry
Create a new cache entry.
-
-
Method Details
-
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.
-