Package jadex.commons.collection
Class CacheEntry
- java.lang.Object
-
- jadex.commons.collection.CacheEntry
-
public class CacheEntry extends java.lang.ObjectEntry for cache.
-
-
Constructor Summary
Constructors Constructor Description CacheEntry(java.lang.Object data, long cachedate, long ttl)Create a new cache entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCacheDate()Get the cachedate.java.lang.ObjectgetData()Get the data.longgetTimeToLive()Get the ttl.booleanisExpired(long now)Test if a cache entry is expired.
-
-
-
Method Detail
-
getData
public java.lang.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.
-
-