[infinispan-dev] eviction + listeners in a local cache with unbounded container

Adrian Nistor anistor at redhat.com
Mon Oct 8 10:34:46 EDT 2012


Hi,
I've encountered a strange situation where eviction listeners are not 
invoked although eviction otherwise works perfectly.

I use a local cache with no eviction policy. Looking at the code in 
DataContainerFactory I can see this leads to an unbounded data container 
which does not broadcast eviction notifications.

Now the problem is when I use a put and specify a lifespan (ie. V 
BasicCache.put(K key, V value, long lifespan, TimeUnit lifespanUnit, 
long maxIdleTime, TimeUnit maxIdleTimeUnit)) it behaves a bit strange - 
the entry is evicted when lifetime expires but no listeners are notified 
of the eviction. Is this behaviour intended or is it a bug? I think it 
would make more sense to invoke those listeners. Now it seems to behave 
as if eviction notification mechanism is disabled just because there is 
no default life time set at cache level.

Cheers,
Adrian


More information about the infinispan-dev mailing list