3 Replies Latest reply: Mar 29, 2012 6:30 AM by Galder Zamarreño RSS

How to use getLastUsed() API in Infinispan 5.1.2

sudheesh p Newbie

Hi,

 

I store an entry into cache like this :

 

advancedCache.put("PB", "Pat", 50000, TimeUnit.MILLISECONDS);

Thread.sleep(100);

advancedCache.get("PB");

DataContainer dataContainer = advancedCache.getAdvancedCache().getDataContainer();

 

InternalCacheEntry entry = dataContainer.get("PB");

if(null!=entry){

 

long lastAccessedTime =entry.getLastUsed();

 

}

 

entry.getLastUsed() always returns -1. What is the exact usage of this API.

 

I need to know the last accessed time of the cache entry. How to do it?

 

Regards

Sudheesh