I have used REPL_SYNC as clustering mode in my cache configuration and do this:
DataContainer dataContainer = cache.getAdvancedCache().getDataContainer();
Set cacheEntries = dataContainer.entrySet();
Iterator itr = cacheEntries.iterator();
Object obj = itr.next();
Here the obj is an instance of org.infinispan.util.Immutables$ImmutableInternalCacheEntry class.
I need to modify certain attributes of the CacheEntry such as lifespan. I am unable to do any set*() operations on obj, since its not permissible.
So how do i convert the Immutables$ImmutableInternalCacheEntry to InternalCacheEntry object.
you can't modify an entry, you can replace it doing a put operation. This is needed as well to trigger the replication of the new metadata to other nodes / cachestores.