Package jadex.commons.collection
Class CacheEntry
- java.lang.Object
-
- jadex.commons.collection.CacheEntry
-
public class CacheEntry extends java.lang.Object
Entry 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 long
getCacheDate()
Get the cachedate.java.lang.Object
getData()
Get the data.long
getTimeToLive()
Get the ttl.boolean
isExpired(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.
-
-