• New Feature
  • Status: Closed
  • 1 Critical
  • Resolution: Fixed
  • ehcache-terracotta
  • hsingh
  • Reporter: amiller
  • November 18, 2009
  • 2
  • Watchers: 2
  • January 17, 2013
  • January 06, 2010

Description

Currently the ehcache-terracotta clustered store does not notify any listeners on eviction. It should at least notify the local cache event listener that eviction has occurred.

Separate jiras will cover clustered notification.

Comments

Alex Miller 2009-12-18

The eviction occurs in the underling DistributedCacheImpl.evict(). In Ehcache, a subclass of DistributedCacheImpl called ClusteredStoreBackend is being used underneath the ClusteredStore (underneath the Ehcache Cache object …whew).

DistributedCacheImpl could have an empty method onEvict() (or something like that) that is overridden in ClusteredStoreBackend. ClusteredStore could pass cache.getCacheEventNotificationService() to the ClusteredStoreBackend so that CSBE could call the RegisteredEventListeners.notifyElementEvicted() method.

Need some tests for this too of course in both express (terracotta-ehcache) and custom (tim-ehcache) deployments.

Himadri Singh 2010-02-22

Eviction event works fine in rev 1916